Hello all,
Sorry for this I am not the smartest with Jira yet but I am trying. I have recently been given the rights to make automations from our company admin and I am looking to make the work of my team easier.
We have epics that are defined as whole projects, stories that are a significant events in the project and sub-task which is the smallest deliverable. I would like to make an automation that happens when the due date of a story changes, the dates of the sub tasks change by the same amount. For example Story 1 has 3 sub tasks. Story 1's due date changes by 4 days. I would like the due dates of these three sub tasks to move by the same amount of time 4 days.
I hope this can be done. I have tried with AI but the solution just removes the sub tasks due dates.
If this cannot be done I welcome any suggestions on how to make changing due dates for stories reflected in their child sub-task issues.
Kind regards
Hi @Ryan Broadhurst
Welcome to the Atlassian Community!
It is possible to do, via one automation.
Please try like this.
Trigger:
Field value changed → “Due date”
Issue type = Story
Create variable:
oldDate
= {{fieldChange.from}}
newDate
= {{fieldChange.to}}
dateDiff
= {{#=}}{{newDate.diff(oldDate).days}}{{/}}
Branch:
For Sub-tasks
Action (edit issue):
Field: Due date
Value: {{issue.duedate.plusDays(dateDiff)}}
You can also add a log action to confirm the dateDiff
value in the audit log.
Hi this is a great suggestion but unless I am doing something wrong the variables created are not logging a value
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I think we can do it via 2 automations, as variables are not being worked in the sub-tasks when we add a branch.
Would you like me to provide a possible solution via 2 automations?
With the first automation, we will capture the day difference between old and new days, and via the 2nd automation, we will copy that value to the sub-task and plus it to the due date.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Ryan Broadhurst
You can do it via Automation by setting :
the trigger “When: Field value changes (Due date)”.
Then add a Condition: If Issue Type = Story
Next, add a Branch rule / related work items → For Sub-tasks
Finally, add an Action: Edit issue → Due date = copy due date from the trigger issue (or from the parent issue)
Hope this can help
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you for your answer but this would make the due date the same as the story. I would like the dates to move by the amount of days that the story moved by.
i.e. Story 1 due date 1 Oct Sub task 1; 4 Oct, Sub task 2 5 Oct. The story moves by 4 days and now I would like the due dates for Sub tasks 1 to 8 Oct and sub task 2 9 Oct.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Ryan Broadhurst
I fully understand your requirement and here a suggestion :
In this case, we need to use another date field to store the value before the change. We’ll rely on the first approach — using a
{{issue.duedate.plusDays(triggerissue.Start date.diff(triggerissue.duedate).days)}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Ryan Broadhurst -- Welcome to the Atlassian Community!
When the Story's field changes, usually one may use the {{changelog}} smart values to detect the "from" and "to" values to calculate the impact, iterating over each Subtask with a branch.
https://support.atlassian.com/cloud-automation/docs/jira-smart-values-issues/#--changelog--
However, please note well: You describe only one scenario which could impact the the work items. When you want to manage the accuracy of the Due Date field and handle other cases, additional rules may be required. For example:
To handle some of these other cases, additional rules with different triggers and logic would be needed. To handle the Atlassian outage case, that is more complicated and may require both additional custom fields and a scheduled trigger rule to perform "clean up" activities.
Kind regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.