Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Assign value automatically, when another value is calculated via JIRA automaton

Lukas July 26, 2022

Hi folks! I have 4 custom fields (Impact, Likelihood, Risk score and Risk rating). Impact and Likelihood are single choice dropdown fields, where predefined values are stored. Based on those values of what you have selected, Risk score is automatically calculated via automation. Based on Risk score, Risk rating should be assigned again automatically.

For example, if Risk score is equal 4 or less, Risk rating should get the value LOW. If Risk score is between 5 and 9, Risk rating should be MEDIUM and so on. But my automation didn't work, however when I manually type Risk score and hit ENTER, it works. What should I change, that the Risk rating get automatically a corresponding value?  

Here are the fields:

risk calculation.PNG

As you can see, Risk score calculation automation works, but Risk rating allocation automation not.

Here is my Risk score calculation automation:

risk score calculation-1.PNGrisk score calculation-2.PNG

And here is the second automation, which didn't work:

risk rating-1.PNGrisk rating-2.PNGrisk rating-3.PNGrisk rating-4.PNGrisk rating-5.PNG

 

1 answer

1 accepted

2 votes
Answer accepted
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 26, 2022

Hi @Lukas 

You seem to have 2 rules, one which makes field changes that could trigger the other rule.

By default, automation prevents that to avoid errors/run-away rules.  You can enable this for the second rule by looking in the details at the top and enabling the option "Allow Rule Trigger".

Kind regards,
Bill

Lukas July 26, 2022

Thank you @Bill Sheboy . It has worked. A question: is there any way to prevent that the calculated value gets manually changed by user after the calculation? For example impact is 2, likelihood is 2, it gives me the risk score 4, therefore my risk rating gets automatically assigned the value LOW. But if I change manually the risk score to 8, risk rating will change to MEDIUM, which is technically correct, but not what I want.

So  basically risk score should be automatically calculable, but not manually changeable. What do you think about the idea? 

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 26, 2022

I have not tried that, although I recall some posts about making fields that can only be set through automated rather than manual changes.  If you do not need to see the field Risk Score, you could either eliminate it (using one rule) or use an entity property to conceal it.

Alternatively to keep the Risk Score visible...a work-around is a modification to your rule which detects a change to the field:

  • checks the {{initiator}} as the user who made the change with a user compare (or advanced compare)
  • and if the user was anyone other than the Automation User...
    • set the field back to the prior value using the change log, and
    • perhaps either log a comment or notify the user
Like Lukas likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events