Forums

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

Automation Ignoring "IF" Statements

Chris Yukubousky March 16, 2022

Hello-

I have automation setup to create five sub-tasks and then an "IF" statement to create four addition sub-tasks depending on the answer. This is working as intended, however, if I add another "IF" statement after the first one, it appears to be completely ignored. The first "IF/AND" validates and works as intended, but anything after that is ignored. Do I need to make a new trigger for this or something? Basically, if one or the other or both are "Yes" I need specific sub-tasks created.

 

 

one.jpgtwo.jpgthree.jpg

 

 

3 answers

1 accepted

0 votes
Answer accepted
carlosughini
Community Champion
March 16, 2022

Hi Chris,

I would recommend using branches in this case, to ensure that the automation is going through the If statements.

So, if you embed each separate If statement in a Branch, they will all be validated separately. Here's what you can do:

Screen Shot 2022-03-17 at 8.20.18 am.png

Please give it a try and let me know how it goes.

 

Cheers,

Carlos

Chris Yukubousky March 25, 2022

Thanks! That worked.

1 vote
Stefan Salzl
Community Champion
March 16, 2022

Hi @Chris Yukubousky ,

An "if" by its own is finite. It just says "if this than that" but: "if NOT this than what?"

Try to run with if-else branches. 

  • IF: first condition check
  • ELSE: second condition check
  • ELSE: third condition check
  • ...

Best
Stefan

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.
March 16, 2022

Hi @Chris Yukubousky 

From what you describe, you may want to use the if/else structure instead.  That will create a block where to add your conditions and processing.  When you want another block, just add another if/else...up to the 60 component limit per rule.  For example:

  • trigger: issue created
  • if/else condition: add your condition
    • action: add the subtask
    • ...
  • if/else condition: add your next condition
    • action: add the subtask
    • ...
  • ...

You should see this nesting on the screen to help you know if you have it correctly implemented.

Kind regards,
Bill

Suggest an answer

Log in or Sign up to answer