Forums

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

Automation: Set of IF/ELSE's not behaving as expected

Jill Vieregge
Contributor
September 28, 2023

When creating a task, I want to check the entries of a multi-selection custom field (so it could have 1, 2 or 3 selections). For each selection, create a sub-task.

The result is always only one sub-task being created. The log and automation has been attached.

Screenshot 2023-09-28 at 3.10.07 PM.pngScreenshot 2023-09-28 at 3.09.50 PM.png

1 answer

1 vote
Trudy Claspill
Community Champion
September 28, 2023

Hello @Jill Vieregge 

That is operating correctly.

The logic of an If/Else is...

If condition A is met then do a thing.

If condition A is not met then check if condition B is met ...

If condition A is not met and condition B is not met then check if condition C is met...

What you need to use is multiple discrete If statements without the Else, so that each condition is checked independently of the other conditions.

If condition A is met then do a thing.

(Regardless of whether or not condition A is met) If condition B is met then do a thing.

(Regardless of whether or not condition A or condition B is met) If condition C is met then do a thing.

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.
September 28, 2023

Hi @Jill Vieregge 

Agreeing with Trudy's answer, and...

To do this without if/else structures you could use a single, advanced branch, iterating over the values in the multi-select field.  Please look at this article for examples of doing that:

https://community.atlassian.com/t5/Automation-articles/Branching-over-smart-values-in-Jira-Automation/ba-p/1741935

Kind regards,
Bill

Like Trudy Claspill likes this
Trudy Claspill
Community Champion
September 28, 2023

I always forget about that method!

Suggest an answer

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

Atlassian Community Events