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 Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
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 Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
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

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 Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
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 Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
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

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

0 votes
Answer accepted
Kian Stack Mumo Systems
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
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.

0 votes
Answer accepted
aravind1516 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 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

Suggest an answer

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

Atlassian Community Events