Send notification when all subtasks are resolved

Kate March 4, 2012

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
Answer accepted
Dieter
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 4, 2012
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.
0 votes
JamieA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 4, 2012

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
TAGS
AUG Leaders

Atlassian Community Events