Send notification when all subtasks are resolved

Hi, all!

I want to use a built-in script "Send a custom email" from Script Runner plugin (groovy), but I don't know how to write next condition, using groovy language: all subtasks are resolved.

My global task: send notification to assignee of task, when all subtasks are resolved.

2 answers

1 accepted

2 votes
Accepted answer
Hi Kirilova, it' possible you don't need to program a condition at all if you use the "Transition parent when all subtasks are resolved" post function in thecsubtask workflow. This post function is also provided by the script runner plugin. It will automatically transition your parent issue once the subtask and all his siblings have been resolved. You would just add the "send custom email" to this parent transition and use the assignee as recipient. Of course you should then fire an event that does not cause another email sent to the the assignee but this can be controlled in the notification scheme.

Hi Kirilova. As Dieter says, the condition is optional, and if you use the "auto-transition when resolved" post-function maybe you don't need this one, it can be handled as a regular notification in the notif scheme.

You might want to use the custom email notif if you want greater control over the email though. Assuming you are using this as a listener or workflow function on the sub-task issue type, this condition should do it:

issue.parentObject?.subTaskObjects?.every {it.resolution}

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Feb 07, 2019 in Marketplace Apps

A Timeless Love Story

It started as any story starts, on a normal, rainy day.   Admin meets App, and her name was Klok2, and like any first relationship we were both trying to make it work but neither one knew what...

460 views 8 27
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you