Hello I need to send a mail, when a customfield ("Group") gets changed. I already got the following, which gets processed without any ERROR but no mail is sent. Am I missing something?
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.event.type.EventDispatchOption;
if (event.getChangeLog().getRelated('ChildChangeItem').find { it.field == ("Group") } ) {
ComponentAccessor.issueEventManager.dispatchEvent(10000L, event.issue, event.user, true)
}
EDIT: We also use Email This Issue and in the specific project we run this script listener, we already configured a mail template and a context / notifications with the given event (10000).