I want to automatically set an end date for a new cloned issue to be today + <<value from numerical field>>
In this case I have a number field called Duration and I set the value to "5" for my test object. When I run the automation I ask it to update the End Date as follows:
{{now.plusBusinessDays({{issue.Duration}})}}
This I think returns Null b/c the end date is not updated thus. Also I added an update to the comments to show the value of {{issue.Duration}} and it shows 5.0
Thoughts?
Hello @Omer Neumeier
Welcome to the Atlassian community.
Are there any messages in the Audit Log for the rule execution that provide insight?
Have you tried using the Log action to print out the final value to the Audit Log for the rule, and seeing what the result is?
Have you tried this way, removing the curly braces around issue.Duration?
{{now.plusBusinessDays(issue.Duration)}}
Is the end date field a date picker or a date/time picker? If it is just a date picker, then you may need to use a formatting function on your value, because {{now} is a date/time value.
Example:
{{now.plusBsinessDays(issue.Duration).jiraDate}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Removing the {{ }} as you suggested works. Can you help me understand why?
From this -> {{now.plusBusinessDays({{issue.Duration}})}}
To this -> {{now.plusBusinessDays(issue.Duration)}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Omer Neumeier
I can't tell you the technical reason why it works, as I am not part of the Atlassian team.
My experience has been that when a function calls for a parameter within parentheses, such as plusDays(value), and you want to use a smart value for that parameter, then you need to not include the curly braces.
There are already curly braces surrounding the entire smart value - {{now.plus...()}}. It seems like when another smart value is inserted into such a statement and you include the curly braces around that interior smart value, then that is a syntax error.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If your questions have been satisfactorily addressed please consider marking the Answer as Accepted to help other community members find posts with validated solutions.
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.