Hi team,
I have set up an automation rule which has various calculations depending on which option is selected in 4 drop-down fields. I have checked these meticulously for any potential errors (spacing/grammar) and all look fine.
The final rule I've added is like this: {{#=}}{{scoreExample1}}*{{scoreExample2}}*{{scoreExample3}}*{{scoreExample4}}{{/}}
I keep receiving the following error
Hi. I'm not an automation expert, but I think the issue is related to an empty value on one of the fields.
The error message kind of points to the problem. On your example you are trying to multiply 4 fields, but the third one is empty, that creates the expression 1*1**1, which is invalid because it has two * side-by-side and that's not a valid operator.
You can fix it by adding default values to your smart values, e.g.:
{{#=}}{{scoreExample1|1}}*{{scoreExample2|1}}*{{scoreExample3|1}}*{{scoreExample4|1}}{{/}}
Notice the '|1' after each field name, that sets the default as 1, change accordingly.
I would also change it to include the 'issue.' prefix. It may not be necessary, but in my mind is a bit more descriptive and avoids other name collisions.
{{#=}}{{issue.scoreExample1|1}}*{{issue.scoreExample2|1}}*{{issue.scoreExample3|1}}*{{issue.scoreExample4|1}}{{/}}
See also, "default values" on the documentation:
https://confluence.atlassian.com/automation/smart-values-syntax-and-formatting-1141480622.html
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.