Hello - I’m fairly new to Lookup tables, and I’m having an issue with an Automation.
I want users to select Severity & Impact, and then use the sum of the lookup Values to populate a 3rd Field with a Priority P Rating value
e.g. Users will select Severity = High & Impact = Medium and the Automation will convert and update another Field as “P2”etc
My Fields are:
Bug Impact (id 1111) - Single Choice Drop Down Values = High, Medium, Low
Bug Severity (id 2222) Single Choice Drop Down Values = High, Medium, Low
Bug Priority (id 3333) Short Text Field (Basically a Hidden Field to ’Store the Sum of the Severity & Impact Lookup Tables)?
Bug P Rating - Short Text Field
My Automation job is as follows
On Creation...
Edit Bug Priority (Clear the field)
Create {{severity}} lookup table
(Key / Values)
High = 1
Medium = 2
Low = 3
Create {{impact}} lookup table
(Key / Values)
High = 1
Medium = 2
Low = 3
Edit Work Item “Bug Priority”
{{#=}}{{impact.get(issue.customfield_1111)}}+{{severity.get(issue.customfield_2222)}}{{/}}
Create {{bugrate}} lookup table
(Key / Values)
2 = P1
3 = P2
4 = P2
5 = P3
6 = P3
Edit work item “Bug P Rating”
{{bugrate.get(issue.customfield_3333)}}
The first part works fine and populates the "Bug Priority" Field with the Sum Value
However the Final bit of my automation - although validating and showing as successful when run- doesn’t actually update the “Bug P Rating” field!
I’ve got all this sort of working by separating all this into 2 Automation Jobs
Job 1 = Create the Bug Priority value
Job 2 = Edit the Bug P Rating using the Bug Priority Value
However, this 2nd job doesn't work automatically i.e. “When Value changes for “Bug Priority”
But, if I manually edit the Bug Priority field - the Automation job kicks in and updates the Bug P rating correctly!
So I’m wondering where I’m going wrong with this - and can I do all this successfully in one automation Job?
Hi @Rick -- Welcome to the Atlassian Community!
First, when using the Issue Created trigger, I recommend adding the Re-fetch Issue action immediately after that trigger to prevent any timing problems leading to fields not ready when the rule starts. This will slow the rule a bit, reloading the issue data before proceeding.
Next, your rule is editing fields and then attempting to use them later in the rule. The edit issue action updates the cloud database, but not what the rule has in memory. The fix for that is again to use the Re-fetch Issue action after each edit when you need the data later in the rule.
For example:
One more thing: if your Impact, Severity, etc. fields are single-selection custom fields, you must access the value for them to work correctly with the lookup table. Otherwise, they will use the index value of the dropdown option. For example:
{{impact.get(issue.customfield_1111.value)}}
Kind regards,
Bill
@Bill Sheboy - You are a star!
I've just added 3x "action: re-fetch issue" to my Automation and its now working!
I've also tweaked / added the .value onto my custom fields - so thank you very much for your assistance with this :-)
Much appreciated
Rick
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Awesome; I am glad to learn it is working! Please consider marking this question as "answered" to help others with a similar need find solutions faster. Thanks!
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.