Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Jira Automation Update Field Based on Multiple IF conditions

ayoung
Contributor
August 8, 2023

Hi Everyone, 

 

I am trying to update one field with potentially 3 different short text values. 

 

If the value of Complexity is 0,1 or 2 - it will update to say "One Team Managed"  (works)

If the value of Complexity is 3 - it will update to say "OCM Managed" 

If the value of Complexity is 4 - it will update to say "PMO Managed" 

 

This is my current set up - 

the first rule executes perfectly 

2nd and 3rd do not.  Can I not combine these this way?

jira complexity rule.jpg

3 answers

1 accepted

0 votes
Answer accepted
Dan Breyen
Community Champion
August 8, 2023

Hi @ayoung I think your darn close.  I did something similar, but instead of using 'Issue Fields Condition" I used "IF, ELSE" So If Complexity is one of 0,1,2 then say "One Team Managed" ELSE If Complexity is 3 then say "OCM Managed" ELSE IF Complexity is 4 then say "PMO Managed" or something along those lines.  

I'm no automation expert, but you could try that.  If all else (hah!) fails and you don't get any other suggestions, open a support ticket.  They've helped me plenty with automations.

Hope that helps.

ayoung
Contributor
August 9, 2023

This completely fixed it Dan - thank you :D Working and code review is now submitted for approval. Much appreciated! 

0 votes
Markus W_ BENES
Contributor
August 8, 2023

@ayoung another reason why its probably not working could be that the variables you are matching are of a different variable type; for example if you are matching a string with an integer value; also if you get the values the wrong way then 0 will work (that also means that your first contition is working) while the others dont.

0 votes
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.
August 8, 2023

Hi @ayoung 

You could use if/else conditions for this.  When you use the simple if-condition, the rule processing stops when the condition is not met.

Another approach is to use the new Lookup Tables feature.  This would permit creating a table row for each value, and then lookup them up directly in a simpler rule.  Please look here for more information about that:

https://community.atlassian.com/t5/Automation-articles/New-Automation-action-Create-lookup-table/ba-p/2311333

Kind regards,
Bill

ayoung
Contributor
August 9, 2023

Bill - thanks for this - I was not aware of look up tables - do they exist in Jira work management cloud or only Jira software/service cloud? 

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.
August 9, 2023

Hmmm...I do not know that.  It is easy to check by looking for the action in the rule editor.

Like ayoung likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events