Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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.

  1. Get the Custom Field definition (has no value)

  2. If the current Issue Event is 1 (meaning Issue Created) and the issues value of the above custom field is set then:

  3. Flag the event as ignored

  4. 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

...