Forums

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

Automation with multiple criteria?

jessica.huebner
Contributor
June 17, 2025

Use Case: I want to automatically set the value of Field C, based on the values from fields A and B. In my case, there are 3 possible values for Field C. Fields A and B both have 3 options each, for a total of 9 conditions (see attached screenshot for a sample of what I've set up). 

Question: Is it possible to have all conditions live in a single automation or must I set up 9 separate automations for each condition?

Automations.png

2 answers

1 accepted

2 votes
Answer accepted
Evgenii
Community Champion
June 17, 2025

Hi, @jessica.huebner 

You're currently using multiple IF conditions in a row, but that approach won't work as expected.

Instead, you should use If/Else condition branches — this structure will better suit your requirements and ensure the logic flows correctly.

jessica.huebner
Contributor
June 17, 2025

I completely missed the If/else option when adding a condition (D'oh)! Thanks for the tip! :)

Like Evgenii likes this
jessica.huebner
Contributor
June 17, 2025

For anyone who might be reading this, I created some If and Else IF conditions for each of my cases and I can confirm this works (see attached image for sample).

Else.png

1 vote
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.
June 17, 2025

Hi @jessica.huebner 

Rather than using if / else condition blocks, you could instead use a Lookup Table to simplify your rule and make it easier to maintain: https://support.atlassian.com/cloud-automation/docs/jira-automation-actions/#Create-lookup-table

The rule would need handling for edge cases to decide what to do if the "input" fields are empty.

For example:

  • trigger: field values change for Project Risk or Project Complexity
  • if / else block
    • field values conditions: to check the both are not empty
    • action: create lookup table
      • Lookup table variable name: varComplexityLookup
      • table row entry
        • key: Low--Low
        • value: low score
      • table row entry
        • key: Moderate--Low
        • value: low score
      • table row entry
        • key: Low--Moderate
        • value: moderate score
      • ...continue to map all 9 possible values
    • action: create variable
      • variable name: varInputs
      • smart value: {{issue."Project Risk".value}}--{{issue."Project Complexity".value}}
    • action: edit work item, to set the rating to
      • {{varComplexityLookup.get(varInputs)}}
  • else
    • ??? what to set the field to when one (or both) inputs are empty

 

For the custom fields creating {{varInputs}}, you might need to use the custom field IDs rather than the field names if their smart values do not work.

 

Kind regards,
Bill

jessica.huebner
Contributor
June 17, 2025

Thanks so much for the suggestion, Bill. I'll definitely be checking this out! While the method I created above works, it does not account for edge cases, like you mentioned. Sounds like the lookup table would account for this.

Suggest an answer

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

Atlassian Community Events