Hi,
I want to fire an event using Script Runner when a custom multi user field is changed. The users in this field should get a notification after the change of the field. What is the correct condition to fire the event? In the best case only newly added users to the custom field will be notified.
Thanks in advance
Thorsten
Hi Thorsten,
In such a case you could use event.eventTypeId:
import com.atlassian.jira.event.type.EventType if (event.eventTypeId == EventType.ISSUE_CREATED_ID) { true } else if (event.eventTypeId == EventType.ISSUE_UPDATED_ID) { changeItems.any { it.field=='my multi user field' } }
Hope that helps
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Thorsten,
For that purpose you can create a Script Listener of type "Send a custom email".
In the configuration of that listener you will need to add a condition similar to the following one:
changeItems.any { it.field=='my multi user field' }
And also add your custom field id to the "
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Alejo,
thank you very much. It works.
But in the case I create the issue it doesn't work. I selected both events issue created and issue updated. But I think that the condition is not true because only the update case is covered. Can I change the condition so that also the create case is covered?
Best Regards
Thorsten
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.