I use an Scriptrunner Script Listener to create sub-tasks. My script condition is as follows:
def subtaskIssueTypes = issue.getSubTaskObjects().collect {it.getIssueType().getName()}
(cfValues['Purge Stock']?.getValue() == 'Yes') && (!('Purge Parts' in subtaskIssueTypes))So the condition above should return TRUE when the Purge Stock custom field value equals "Yes" AND when there is NOT already a Purge Parts sub-task created.
The Script Listener event is set to Issue Create and Issue Update. The Script Listener does NOT work when I change the custom field value to "Yes" on a workflow transition screen. However, it DOES work when I set the value to "Yes" on the issue CREATE screen and when changing the custom field value to "Yes" from the VIEW screen.
Any ideas why the transition screen isn't working?