When an existing Epic's due date changes I want to calculate the difference in business days between the old value and the new value, and then apply that difference, also in business days, to the due date of each child ticket. Most of the child tickets will have a due date that can be anywhere from 1 to 60 days prior to the Epic's due date, so if the Epic's due date changes it can be a pain to manually recalculate the new due date for each of its child tickets.
I've been able to accomplish the first part using 3 sequential variable actions to get the Epic's old due date value, new due date value, and diff in business days. However, when I try to modify the child tickets' due date using the output from the 3rd variable as the number of business days the end result is that each child's due date field gets cleared.
Here's an example of the rule I've got built as a proof of concept. It intentionally assumes that the Epic's new due date will always be greater than its old due date to make for easier troubleshooting:
When: value changes for Due date
If: issue type = Epic
Then: create variable
And: create variable
And: create variable
Branch: for children
Hi @mliesik_tpci -- Welcome to the Atlassian Community!
Created variables are text, as you saw when converting some of your values with toDate.
To use your varEpicDueDateDiff as parameter for the function, please use the asNumber function:
{{issue.duedate.plusBusinessDays(varEpicDueDateDiff.asNumber)}}
To learn more about using variables as numbers in various situations, please see this article I wrote on the topic:
Kind regards,
Bill
@Bill Sheboy that did the trick! Thanks tons! :)
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.