I have 2 custom (global) fields "Impact group" and "High level estimate" which are dropdowns. Each option in the dropdown I want to associate with a number. Then I want to add those 2 numbers and show the result in another custom field "Calculated priority" (number).
My fields:
"Impact group" (dropdown):
Internal stakeholders - should be worth 5 points
Compliance and legal - should be worth 4 points
"High level estimate" (dropdown):
Low: should be worth 1 point
Medium: should be worth 2 points
Now, for example, if I select:
"Internal stakeholders" AND "Low" -> my calculated priority should show 6
"Internal stakeholders" AND "Medium" -> the result should be 7
"Compliance and legal" AND "Low" -> 5
Etc.
I don't want to use ScriptRunner. I am using Automation and creating a Rule for "Value Changed". You can see where I am entering the formula:

My formula is not working. Any idea why?
{{#=}}
0 +
{{#if(equals(issue.fields.Impact group.value, "Internal stakeholders"))}}5{{/}}
+ {{#if(equals(issue.fields.Impact group.value, "Compliance and legal"))}}4{{/}}
+ {{#if(equals(issue.fields.High level estimate.value, "Low"))}}1{{/}}
+ {{#if(equals(issue.fields.High level estimate.value, "Medium"))}}2{{/}}
{{/}}