Forums

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

Automation for moving dates on a subtask by the same delta as the parent issue

Swati Rastogi
Contributor
August 4, 2023

Looking for some suggestion on creation an automation or JQL to help move a subtask by the same number of days by which it's changed in the parent task.

For instance, due date on a Story is Aug 15, 2023, which gets changed to Aug 17, 2023. Then to move the due date on the Sub-task as well by two days irrespective of the due date, so for instance the due date on sub-task is Aug 12, 2023 that gets updated to Aug 14, 2023
Thanks for any suggestions and insights for this request.

1 answer

1 accepted

3 votes
Answer accepted
Trudy Claspill
Community Champion
August 4, 2023

Hello @Swati Rastogi 

This is the rule you'll need.

Screen Shot 2023-08-04 at 11.20.23 AM.pngScreen Shot 2023-08-04 at 11.20.32 AM.png

The smart value in the Create Variable action is:

{{fieldChange.from.toDate.diff(fieldChange.to.toDate).days}}

The smart value in the Edit action is:

{{issue.duedate.plusDays(dueDateDiff.asNumber)}}

 

You may want to change the Condition where I'm checking that the trigger issue is a Story.

If it is possible that a subtask may have no due date, you may want to add a Condition in the For: Sub-tasks branch to first check if the subtask has a due date before editing it.

Swati Rastogi
Contributor
August 4, 2023

That works perfect! Thank you so much Trudy for such a quick response! Saved the day!!

Like Trudy Claspill likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events