Automation rule| Update the parent status to "Done" only when all subtasks are also in the "Done" status.
Platform Notice: Cloud Only - This article only applies to Atlassian products on the cloud platform.
Summary
This article aims to provide guidance on setting up an automation rule to address the following use cases;
Use case 1:
Automatically update the status of Story-1 to "done" only when all subtasks are marked as "done"; otherwise, retain the current status of Story-1.
Issue hierarchy :
Story 1
|-- Subtask 1
|-- Subtask 2
|-- Subtask 3
|-- Subtask 4
Use case 2:
If an issue transitions from "In progress" to "Done" locate the parent issue. Subsequently, all child issues under this parent should be transitioned to the "Done" status.
Solution
The automation rule can be setup as mentioned below :
Use case 1:
Trigger: Issue Transitioned: To status "DONE"
If: Issue Type: Subtask
Re-fetch
Branch : For Parent
If : Related issues condition
Related issues = Sub-tasks
Condition = All match specified JQL
Matching JQL
Status= "Resolved"
Transition issue to "Resolved"
Use case 2:
Trigger: Issue transitioned: In progress to Done
Create variable:
Variable Name = x
Smart value
1
{{issue.parent.key}}
Branch: Type of Related Issue: JQL
JQL query: Parent = {{x}}
Transition issue: Copy from triggered issue.
Was this helpful?