Adjust parents due date automatically to the nearest due date of one of the sub-tasks

Sharon Freij March 30, 2021

Hi everyone, hope someone can help me.

Within my jira project, I have several Stories, Tasks and sub-tasks. With Jira automation, the story/task will be automatically progressed when all of the sub-tasks are done (for example). 

But now I'm facing an issue which I'm not able to solve. Hope that someone within this community can help.

I would like to make the due date of the parent dependent on the nearest/shortest due date of their sub-tasks. For example:
Story --> due date is empty during creation
Sub-task 1 --> due date is 01.04.2021
Sub-task 2 --> due date is 06.04.2021
Sub-task 3 --> due date is 31.03.2021

The due date of the parent should also be 31.03.2021 automatically.

How to do that?

2 answers

2 votes
Hana Kučerová
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 31, 2021

Hi @Sharon Freij ,

welcome to the Atlassian Community!

First idea - what about to react on the change of sub-task's due date? Something like - everytime the due date of sub-task is changed, find the parent and compare the dates. If the parent's due date is greater then the sub-task's due date, change the due date in the parent...

Sharon Freij March 31, 2021

Hello,

thanks for your answer!

This idea would already help me a lot, but 1 remark: in our way of working we can have multiple sub-tasks in a story. How do I know that the due date from the parent represents the earliest or the latest sub-task due date?

For example if one of my sub-task due dates changes, and its right in the middle (between earliest and latest date), my parent task should not change.

Hana Kučerová
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 2, 2021

Hi @Sharon Freij ,

how I imagine this functionality:

1) The main story is created, it's due date is empty

2) The first sub-task is created with due date 30. 4. 2021, there's no due date in parent, so the parent's due date is set to 30. 4. 2021

3) The second sub-task is created with due date 31. 3. 2021, this due date is compared to the parent's due date - it is earlier, so the parent's due date is set to 31. 3. 2021

4) The third sub-task is created with due date 31. 5. 2021, this due date is compared to the parent's due date - it is not earlier, the parent's due date remains 31. 3. 2021

5) The third sub-task is updated with due date 15. 3. 2021, this due date is compared to the parent's due date - it is earlier, so the parent's due date is set to 15. 3. 2021

6) and so on...

So, I believe, if you do the comparison every time the due date changes in one of the sub-tasks, this could work... But it will work only for new stories.

How many stories do you already have in your project?

Like Isaiah John likes this
Sharon Freij April 12, 2021

Hi @Hana Kučerová 

Thanks for your reply. 

I already have a lot of stories in my project, but that's not a problem. I'm looking for a solution for new stories, so that's fine.

How do I compare the due date of the parent with the due date of the sub-task? And if it needs to be changed, how should my automation rule look like? 
Still struggling :) ...

Hana Kučerová
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 14, 2021

Hi @Sharon Freij ,

please try something like this:

When: Value changes for Due Date (for all issue operations)

IF: Issue Type equals Sub-task

For Parent:

- If: Issue matches JQL: duedate is EMPTY

- Then: Edit issue fields: copy Due Date from Trigger Issue

For Parent:

- If: Issue matches JQL: duedate is not EMPTY

- And: Compare two values: Checks if: {{triggerIssue.duedate.diff(issue.duedate).days}} is greater than 0

- Then: Edit issue fields: copy Due Date from Trigger Issue

Like Isaiah John likes this
Steven Lloyd October 7, 2021

Hi Hana,

Thank you for the above, one question I do have and apologies if this is a silly question, I am struggling to see how you map to the "Copy due date from trigger issue". Is this a smart value or pulled through from the "More options" section?

Hana Kučerová
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 23, 2021

Hi @Steven Lloyd ,

I'm sorry about the late answer.

1) Click on ... -> Click on Copy from...

copy1.png

2) Click on Copy Due date from Current issue -> Click on Current issue -> Select Trigger issue -> Save

copy2.png

0 votes
Thomas Kish
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 10, 2023

Microsoft project automatically does this, its a shame that its not automatic in Jira. As well as linked tasks, in Project if you have linked tasks and  you move one, it can automatically reschedule all of your other tasks. It looks like this is completely manual in JIRA.... :(

Suggest an answer

Log in or Sign up to answer