Can I automatically set the due date of a parent issue to the maximum due date among all sub tasks?

Whenever a sub-task's due date is edited, I'd like to update the parent's due date if the sub-task's due date is later then the current due date of the parent (and all other sub-tasks).

1 answer

1 accepted

2 votes
So this automation rule is a bit crazy, but it is *actually* possible to do this.  Here's a screenshot of the rule in action:
Let me break this down:
  • First we have an issue updated trigger
  • Next we have a condition to check that the issue's duedate was updated by checking that {{#changelog.duedate}}{{toString}}{{/changelog.duedate}} is not empty
  • Next we run a JQL condition to check it was a sub-task we edited
  • And then we have a related issues condition that checks all other sub-tasks and parent (excluding the current issue) to see if they all have due dates before the current issue.  So first we lookup siblings and parent using: parent = {{issue.parent.key}} and key != {{issue.key}} OR key = {{issue.parent.key}}
    Then we check that all of them match: duedate is empty OR duedate < '{{#issue.fields.duedate}}format="jqlDate"{{/issue.fields.duedate}}'
  • If that's true, then we edit the parent issue and set its duedate to the due date of the issue that triggered the rule chain using this advanced JSON:

       "fields": {


Here's a screenshot of just the related issues condition as well:
This is a pretty advanced use-case for Automation for JIRA and not quite as simple as we'd like it to be yet!  

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

3,338 views 14 20
Join discussion

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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot