I created a number custom field called "Duration" that I want to use to calculate the Due Date, for example Due Date = Start date + Duration.
I created an automation but when I update the Start date, the value on the Due Date field disappears (if not empty) and the Automation Audit Log shows no errors and a status of success.
This is the Smart Value I am using:
{{issue.Start Date.plusBusinessDays(issue.Duration)}}
The fields that I am using are:
Start date
Duration
Due date
If I use the following Smart value, it works fine, and the Due Date field gets updated:
{{now.plusDays(7)}}
Any idea what's wrong?
I was able to re-create the issue you are facing. The due date got empty when i edited the start date while there was no value in the duration field. so when there is no value in the duration field and then you edited the start date the due date value will be empty. can you please check the issue if there was value on the duration field. The smart value is not the issues it is working as expected.
Thank you.
Hello @Jerrold - Empyra
Yes, both the Duration and the Start date fields have values. The Duration field is setup as a number field.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Here's a screenshot of the values on the Duration and Start date and the automation Edit part. I use "Duration" and the custom field ID and both options give me the same result.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
when i use the custom field id i am facing this issue but when i am using the name its working as expected so can you try one more time with the custom field name and still if its not working then can you try in the advance way. unselect the due date from the choose fields to set and click on more options and inside the additional fields insert this
{
"fields": {
"duedate": "{{issue.Start Date.plusBusinessDays(issue.Duration)}}"
}
}
and update the rule and see whether its working
Thank you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi again @Jerrold - Empyra
First of all, thanks for your help.
I made the changes you suggested and now I am getting the following error message:
And here's my rule:
I modified your query to see if that helped but I am getting the same error message:
{ "fields": {
"duedate": "{{issue.Start Date.plusBusinessDays(issue.Duration).format("yyyy-MM-dd")}}"
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Jerrold - Empyra It seems that the problem is with the Start Date field. I tried the following script and it works:
{ "fields": {
"duedate": "{{now.plusBusinessDays(3)}}"
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Can you Please try the below automation and share the audit logs. And Please make sure the "Duration" custom field ID is correct.
Thank you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Jerrold - Empyra Same problem. The dueDate field gets empty and the Automation Audit Log shows no error:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'm sorry that I couldn't pinpoint the exact root cause of the issue. It seems like there might be an error in pulling the start date data, leading to a null value when adding 3 days to it. Please check if there are any other custom fields named "start date." If you're using the default start date, try replacing it with its custom field ID, which is "10015" (this ID remains consistent across all cloud instances). You can use the following smart value in the edit action:
{{issue.customfield_10015.plusBusinessDays(issue.customfield_14335)}}
If You are still facing this issue please reach out to the Atlassian support team and they will look into it and help you on this regard you can raise a ticket from this link Atlassian support
Thank you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Jerrold.
I found the problem. The ID for my "Start date" field is 14207.
I used that on the Automation Script and it worked.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Jerrold - Empyra
Yes, both the Duration and the Start date fields have values. The Duration field is setup as a number field.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.