I do have many issues which block other issues.
If I change the duedate of an issue, I want the start date and due date of every blocked issue to be changed by the same delta.
Issue1: due date = 10.1.2022 blocks Issue2 (link is set)
Issue2: starte date = 20.1.2022; due date = 14.2.2022
Now if Issue1 due date is changed to 15.1.2022 (delta = 5 days) I want Issue2 start date and due date to change by 5 days too.
My rule looks as follows:
Due date and start date, both endup empty.
What is wrong with the calculation?
Thanks for your help!
Hi @Michael Dammerer -- Welcome to the Atlassian Community!
First thing: please think about your edge cases to test and decide how to handle them in the rule:
Next, I wonder if there is a field typing issues, so perhaps try adding toDate before the diff() calls, such as
If that doesn't work, try explicitly referencing the changed field data with:
Thanks for your Help. Now it Works.
I had to fix two bugs:
I needed to add toDate as you proposed.
and "issue.startDate" needs to be "issue.start Date" with a space.
which is weard, because "issue.dueDate" is without space.
My Automation now looks like this:
with the formulas:
for start date:
Well done; I am glad to learn you got this to work!
The smart values are case-sensitive and spacing-sensitive, so when in doubt use the information in this how-to article to confirm the smart values: https://support.atlassian.com/cloud-automation/docs/find-the-smart-value-for-a-field/
Also, I note in your rule that you are editing the same issues within the branch multiple times. That could cause some problems of data getting "walked over" by later edits. I recommend changing your branch to:
Please let your testing decide if you want to do this change. If your rule works and the description is still present after the date field edits, your rule is okay as-is.
Hi @Frank Liang -- Welcome to the Atlassian Community!
You can perform the date diff on business days to exclude weekends: https://support.atlassian.com/cloud-automation/docs/jira-smart-values-date-and-time/
However, that will not account for removing any holidays (non-working days) you have defined; only weekends.