Automatically append some generated comment on a transition.
In this case we add a comment if a user resolved an issue which had unresolved subtasks:
if(issue.subTaskObjects.any {!it.resolution }){
issue.addComment('I resolved this issue even though there were unresolved sub-tasks...'){setDispatchEvent(false)}}
Line 11: Change falsetotruein order to raise anIssueCommentedevent for notifications.