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?
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.
I completely missed the If/else option when adding a condition (D'oh)! Thanks for the tip! :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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:
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
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.