Hi,
I am trying to create a listener that sends an email only when a given 'custom field value is not null' and any one of the following 3 conditions is true:
- Priority - When Priority of an issue is updated
- Status - When an issue is transitioned to another status
- Comments -When new comments are added or existing comments are edited or deleted.
ScriptRunner Condition & Configuration:
issue.projectObject.key == 'XXXX' && issue.issueType.name in ['Story', 'Incident'] && cfValues['customfieldname'] != null &&
(changeItems.any { it.get('field')=='priority'} == true) || (changeItems.any { it.get('field') == 'status' } == true)||-- Code is working until here.
(changeItems.any { it.get('field') == 'comments' } == true)-- This is not yielding the correct results.
From the above code, I am able to successfully verify if the custom field value is not null and if there is a change in the priority field or status change for a given story or Incident.
However, unable to do the verify the changes for 'Comments'.
Any ideas on how to achieve this?
Thanks in advance!
