I am using Jira Automation on Jira DC 9.3.
What I am trying to do is to use the result of a math round function as a parameter of plusDays() function to set the duedate field.
(Below, I am using the value 13.2 for brevity. Actually, that value will come from another smart value, from the json of a previous REST call action.)
I tried this. This one works:
{{now.plusHours(round(13.2, 0))}}
But since the value from the REST call json is a string, I need to add an asNumber function like this:
{{now.plusHours(round({{asNumber}}13.2, 0))}}
When the rule runs, I get this error:
Error rendering smart-values when executing this rule:
Failed to get value for now.plusHours(round({{asNumber: {{now.plusHours(round({{asNumber}}13.2, 0))}}
Then I presumed this was caused by the round function not being enclosed in math expression tags so I tried this:
{{now.plusHours({{#=}}round({{asNumber}}13.2, 0){{/}})}}
This time I can't even publish the rule. I get the following error message while trying to publish:
Error parsing template: Mismatched start/end tags: null != in template ....
The one below saves and executes successfully but of course, it processes the now.PlusDays() function as text and doesn't run it. It just prints it.
now.plusHours({{#=}}round({{asNumber}}13.2, 0){{/}})
I hope someone can enlighten me about this.
Thank you
EmreT