Hi all,
I'm pulling my hair out.
Situation:
I have multiple (6) custom dropdown fields, and the options for each of these fields is slightly different alphanumeric text - but they all start with "3.", "2." or "1."
Goal:
I am trying to create an automation rule, that:
Problem:
I can't seem to make this automation work. I keep getting this error:
"Unable to render smart values when executing this rule:
Missing parameter(s) for operator +u: + + + + +"
I've tried various different smart value functions: .split, .char(0) etc. But none has worked correctly. The only time I don't get this error, is when I add a "0" to the total variable action.. But this just lets the automation run successfully, while not totaling the number values correctly.
Please help gurus!
I ended up being able to solve this, using the below formatting for the first batch of variable actions:
{{#=}}IF({{Issue.customfield.value.startsWith("3")}},3,IF({{Issue.customfield.value.startsWith("2")}},2,IF({{Issue.customfield.value.startsWith("1")}},1,0))){{/}}And for the total automation:
{{#=}}{{variable1}} + {{variable2}} + {{variable3}} + {{variable4}} + {{variable5}} + {{variable6}} +0 {{/}}
Hi @Simon Galiazzo ,
You should be able to use a combination of smart values to get to where you want.
The first step is to create a variable for the value of a field. The reason for this is that select list values do not behave as Text values. Therefore you can't directly use 'left' or 'split'. So step one:
Action "Create variable" and set the variable to
{{issue.Your field name}}
If the number is always the first (single) character, you can use the 'left' smart value to get the first character.
{{yourVariable.left(1)}}
Now you can use it as a number and do math expressions.
{{#=}}{{yourVariable.left(1)}} * {{yourVariable.left(1)}} {{/}}
Hope that helps.
Have a nice day!
Rik
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
For a multiple-select option field where the leftmost character of each value is a numeric digit, this would return the total:
{{#=}}{{issue.customfield_12345.value.left(1).join(" + ")}}{{/}}
How that works is:
I recommend considering what you want to do when there are no options selected.
Kind regards,
Bill
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.