Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Automation rule to update parent issue due date to the latest due date in subtasks?

Mariano
Contributor
November 16, 2021

Hello! I am trying to achieve a rule that will update the Parent Issue due date, to the latest due date of any subtask created.

 

Being the noob that I am, I tried the following:

688.png

 

I managed to Pick a date and make it be the Parent Issue due date if the subtask date changes and is later than the Parent Issue due date, however, I am having trouble making the subtask due date become the Parent Issue due date.

 

Any help would be greatly appreciated!

 

2 answers

1 accepted

2 votes
Answer accepted
Gareth Cantrell
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 16, 2021

Hi @Mariano 

In branch rules, the {{issue}} smart value refers to the issue that the branch is executing on, in your case, the parent issue.

To refer to the issue that triggered the rule when inside a branch rule, use {{triggerIssue}} instead.

In short, your condition should be: {{issue.duedate}} is less than {{triggerIssue.duedate}}

Similarly, in the Edit issue action, use {{triggerIssue.duedate}} to set the parent issue field.

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 16, 2021

Hi @Mariano 

Yes, and...to what Gareth and Fabian suggest:

Does this ever happen...How do you want to handle the case when all sub-tasks' due dates have changed such that they are now all *earlier* than the before?  (And so the Parent is later than the actual set of children.)

One way to address this for sub-tasks is to use the list functions instead, finding the max() value of the due dates for any sibling sub-tasks, and set the parent to it.

https://support.atlassian.com/jira-software-cloud/docs/smart-values-lists/#Smartvalueslists-list.max

Kind regards,
Bill

Like # people like this
Mariano
Contributor
November 17, 2021

Thanks @Gareth Cantrell and @Bill Sheboy ! I will look into this as it seems the most sensible path to take. 

@Bill Sheboy YES, I haven't thought about it. Thanks for pointing out to the right direction! I always admire people who forsee things, and I try to learn as much as I can from them (and you!)

I will read certainly read about these functions on my lunch break, thanks again! 

Like Bill Sheboy likes this
Mariano
Contributor
November 17, 2021

Thank you @Bill Sheboy , it worked perfectly!!

Like Bill Sheboy likes this
1 vote
Fabian Lim
Community Champion
November 16, 2021

Hi @Mariano

Try using the "create variable action" and put the {{issue.parent.dueDate}} as a new variable before you branch out. Then when you compare and edit, add the new variable.

link: https://community.atlassian.com/t5/Jira-articles/Automation-for-Jira-Create-variable-New-component/ba-p/1448118

Regards.

Mariano
Contributor
November 17, 2021

Fantastic, thank you @Fabian Lim will be looking into this today! Thanks!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events