Automatically Update Parent Task Based on Subtask Changes in Advanced Roadmap
Platform Notice: Cloud Only - This article only applies to Atlassian apps on the cloud platform.
Summary
This article will outline how to automatically update the parent task's start and due date when its subtasks' dates are changed via automation.
Solution
Basic steps
Trigger: Changes to the fields 'Start date' or 'Due date'
Condition: On work items of type Sub-task
Then: Lookup Work items to collect all Sub-tasks of the same parent
(Optional) Add info to the audit log
Branch: For Parent
Edit Work Item Fields: 'Start date' = Minimum of the dates of Sub-tasks, 'Due date' = Maximum of the dates
Detailed Steps
Go to ⚙ > System > Global Automation
Click on Create rule -> Create from Scratch
Select the trigger Field value changed. Add the fields 'Due date' and 'Start date' as the fields to monitor
Add component IF: Add a condition and select Work items field condition
Field: Issue Type
Condition: Equals
Value: Sub-task
Add component THEN: Add an Action and select Lookup work items
JQL:
issuetype = Sub-task and parent = {{issue.parent}}
(Optional) Add component THEN: Add an Action and select Log action
Enter a Log message of your choosing
Add component FOR EACH: Add a Branch and select Branch rule / related work items
Type of related work items: parent
Add component THEN: Add an Action and select Edit work item
Select the fields 'Due date' and 'Start date' from the drop-down list
'Due date':
{{lookupIssues.customfield_100015.min}}
'Start date':
{{lookupissues.customfield_100056.max}}
Click on Turn on rule to give the rule a name and enable it
Example

ℹ️ Don't forget to test the rule to make sure it executes as expected.
Was this helpful?