@JamieA
I use a Script Listener to create a sub-task when a custom field value equals "Yes." I also use a Fast-Track Post Function to transition my workflow when:
issue.subTaskObjects.size() == 0
So essentially, I want to Fast-Track my workflow forward if there aren't any unresolved sub-tasks (Note: I recognized the condition above won't do what I need. I address that below.) . If I update the custom field value to "Yes" via a transition screen, I expect the Fast-Track to FAIL since a sub-task is created. However, this does not happen. I believe that what may be happening is that the Post Functions, including the Fast-Track, complete before the Script Listener determines I've updated the custom field to "Yes." So the sub-task is created AFTER the Fast-Track post function has completed.
The reason I think this is happening is because the Fast-Track is blocked, as I expect, when I complete the previously stated actions AND a sub-task already exists on the issue.
QUESTIONS:
- Am I correct in my assumption that the Post Functions might be completing before the Script Listener is taking action?
- The current condition I'm using above is not what I need. I really want to confirm that IF there are any sub-tasks open that they must all be resolved to allow the Fast-Track to complete. Can you guide me on how to create that script condition?
Thanks for your help.