...
In the JEMH Notifications > mapping, there is an Event Selector and Filter script field, here we use a simple Velocity script to check the current Issue (the $issue is actually a TemplateIssue object). Below is a script to achieve this, next is a line by line description.
Get the Custom Field definition (has no value)
If the current Issue Event is 1 (meaning Issue Created) and the issues value of the above custom field is set then:
Flag the event as ignored
Give a reason for why the event is ignored
Code Block |
---|
#set ($theCustomField = $customFieldManager.getCustomFieldObject("customfield_10900") ) #if ( "$issueEvent.getEventTypeId().longValue()"=="1" && $!issue.getCustomFieldValue($theCustomField) ) $result.setIgnoreEvent(true) $result.setReason("Ignoring ISSUE_CREATED by JEMH, expecting JEMH custom event") #end |
...