Forums

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

I seem to have no if/else block in automation

Phil Bustin
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.
March 6, 2023

I seem to have no if/else block option in our Jira automation function.  Why is that, please?

No if-else block.jpg

3 answers

3 accepted

1 vote
Answer accepted
Trudy Claspill
Community Champion
March 6, 2023

Hello @Phil Bustin 

Please show us the entire rule you have and where you are trying to insert the If/Else.

There are limitations to where it can be used. I believe it can't be used within a Branch, for example.

Phil Bustin
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.
March 6, 2023

I found if/else, by starting to create a new rule. When I clicked before the branch in the existing rule, I still didn’t see it, so I guess an existing rule precludes if/else if there’s a branch, period. I’m still not clear on why I needed a branch in the first place. Perhaps it’s unavoidable:

BA MO Tasks Complete rule.jpg

Trudy Claspill
Community Champion
March 6, 2023

Having a branch doesn't preclude inserting If/Else before the branch.

Screen Shot 2023-03-06 at 1.49.38 PM.png

 

Since you haven't told us anything about what you want to do with your rule I can't speak to why you need a branch.

Like • Kelly Arrey likes this
Phil Bustin
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.
March 7, 2023 edited

The answer to your question is interesting but simple: I used as my model a Community post on transitioning the parent when all sub-tasks are done:

https://community.atlassian.com/t5/Automation-questions/How-can-I-transition-the-parent-when-all-subtasks-are-resolved/qaq-p/159407

Somehow, I thought I'd see the if/else option as soon as I clicked New component, but now I see that it is in the menu after I click New condition.  It was hiding in plain sight, for days. :-)

Meanwhile, by copying the rule that works, and in the copy, changing within the branch the value in the condition and transition name in the action, I have a two rules that work together.

Just to know, why doesn't this attempt at a Rule with stacked conditions (that are actually mutually exclusive) within the branch work?

Rule with two conditions stacked.jpg

Trudy Claspill
Community Champion
March 7, 2023

Can you provide the Audit Log details for an instance where the stacked conditions version did not work?

Phil Bustin
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.
March 7, 2023

Stacked rule log.jpg

Trudy Claspill
Community Champion
March 7, 2023

So, TAST6-783 is the subtask that triggered the rule.

TAST6-771 the parent of the subtask .

The second entry in the log indicates that it is successful in getting past the "If Sub-tasks match" component; all sub-tasks of TAST6-771 are in the status of "Dev Task Completed".

The third entry in the log indicates that is is failing on the "To Region = PA"; for TAST6-771 the To Region field is not set to PA

To achieve what I think you want you would need to restructure your rule thus:

For Parent
If sub-tasks are all "Dev Task Complete"
and Parent's To Region field is "PA"
then transition parent to PA Certification
For Parent
If sub-tasks are all "Dev Task Complete"
and Parent's To Region field is one of "BA","MO"
then transition parent to Selecting Tasks
Phil Bustin
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.
March 7, 2023 edited

Elegant.  I created the new branch, duplicated the first condition, and dragged the other two conditions under the new branch.  It works.

1 vote
Answer accepted
aravind1516
Contributor
March 6, 2023

Hi @Phil Bustin , In issue field condition you will be able to see the if/else condition.

Phil Bustin
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.
March 6, 2023

That appears to be untrue.

aravind1516
Contributor
March 6, 2023

What do you mean by untrue can you please elaborate it

Phil Bustin
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.
March 6, 2023

When I click "field condition" in the menu you see in my posted question, I only see:

Clicked Issue fields condition.jpg

Evalyn Tostado
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 26, 2025 edited

This ended up being the correct answer for me, but it took some poking around to understand as it is rather unintuitive. When adding the IF condition, you are immediately presented with a bunch of condition options. I kept selecting 'Work item fields condition' first since that's ultimately what I wanted to do, but ended up stuck since you cannot have an else branch at that point. The solution is to look further down the list of conditions and find the 'IF or ELSE: Add condition options'. After this is specified, you end up with a branch and can proceed to adding the actual conditions.

 

Screenshot from 2025-03-26 13-33-07.png Screenshot from 2025-03-26 13-33-44.png

0 votes
Answer accepted
Kian Stack Mumo Systems
Community Champion
March 6, 2023

@Phil Bustin

Is this inside of a branching statement by any chance? The If/Else doesn't work inside of branching statements!

 

Thanks,

Kian

Phil Bustin
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.
March 6, 2023

Please view my reply to Trudy's answer, above.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Product Admin
TAGS
atlassian, confluence, loom, atlassian intelligence, ai notes, ai-powered meeting notes, atlassian community events, ace, confluence ai, loom ai integration, ai note-taking, atlassian ai features, team '25, atlassian live learning, confluence automation

Unlock AI-powered meeting notes: Join our live learning session! 📹

Did you catch the news at Team ‘25? With Loom, Confluence, Atlassian Intelligence, & even Jira 👀, you won’t have to worry about taking meeting notes again… unless you want to. Join us to explore the beta & discover a new way to boost meeting productivity.

Register today!
AUG Leaders

Atlassian Community Events