On this page
Use case
Avoid the manual work by closing the parent after checking if all sub-tasks are done, let automation do it for you!
Issue transitioned event
Create a new rule and name it appropriately.
Providing a description will help you to identify what the rule does but this step is optional.
Add a Trigger → Issue transitioned event
JQL condition
Add the following expression:
issuetype in subtaskIssueTypes()
Boolean condition
Next to the JQL condition click on Add → Boolean condition
Add the following expression:
%{trigger.issue.status} = "Done" and count(siblingSubtasks()) = count(filterByStatus(siblingSubtasks(), "Done"))
This way the rule execution will only continue, if the current issue was transitioned to Done and if all other sub-tasks under the current parent issue are also in status Done.
Issue selector
Next to the Boolean condition click on Add → Issue selector
Choose Parent issue as the target issue.
Transition issue
Finally, next to the Issue selector click on Add → Action → Transition issue
Set the mode to Transition to status and choose the status Done.
Enable the rule by clicking on the Enable button →
Screencast
No screencast available at the moment.
Import the example
Import the JSON file below to get started in no time.
Related examples
If you still have questions, feel free to refer to our support team.