I would like to create an auotmation that when an activity is delayed then the linked activity (link types: blocks) delays by the same time interval. However, the automation does not read the variables inside a date sum or difference operation. Is there any error in the code?
Issue.customfield_10015 is the field of start date.
Hello @Andrea Ferraris
Welcome to the Atlassian community.
I recommend that you start by using the Log Action to print out your variables and your calculated values into the Audit Log to ensure you are getting the values that you expect.
Can you show us the Audit Log for the rule execution?
The variable LeadTime is empty, therefore DueDate remains the same as before and does not add with LeadTime.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You are creating the variable LeadTime from
{{issue.customfield_10015.diff(EndDate).days}}
That suggests there is something wrong with that smart value that you are trying to assign to the LeadTime variable.
I see that EndDate is also a variable that is set from DueDate.
The issue is that content saved to a variable is Text. Your variables are not being recognized as Dates.
To use them in date functions and have them treated as dates you need to convert the text to dates.
{{issue.customfield_10015.diff(EndDate.toDate).days}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Now the LeadTime calculation is correct but the automation does not perform the sum on the duedate.
I used this formula: {{issue.duedate.plusDays(LeadTime)}}
Is there any error?
Thank You!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This problem is similar to the first.
LeadTime is a variable you constructed.
Variables are stored as strings/text.
Jira doesn't automatically recognize text that is numbers as a number.
You need to convert the text string to a number to use it as a number.
{{issue.duedate.plusDays(LeadTime.asNumber)}}
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.
Yes
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Spend the day sharpening your skills in Atlassian Cloud Organization Admin or Jira Administration, then take the exam onsite. Already ready? Take one - or more - of 12 different certification exams while you’re in Anaheim at Team' 25.
Learn more
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.