Forums

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

Give me a BREAK

Darryl Lee
Community Champion
July 29, 2026

image.png

[Gimme a Break!]

Ok, I guess technically what I want is a STOP command, because yes, my first programming language was BASIC.

Here's the thing. I've got an Automation Rule Flow that already has a few nested IFs. 

But I need to flip the logic around, and I really just need to have the whole thing STOP if a condition is met.

I think if I use a standard top-level IF block, that will do the trick, because the way it is worded is:

WHEN: Work item created
IF Parent Key field is not empty
THEN Do the rest of the thing
AND So on

So... no ELSEs yet. I use those later.

But at this point, if Parent Key IS EMPTY, it should just stop, right?

But what I really want to do is add a comment before it stops. :-}

So I was thinking, wait, I know sometimes rules BREAK. Like when a WebRequest fails, etc.

What's the most efficient way to do that?

So I would rewrite the logic above to be:

WHEN: Work item created
IF Parent Key field is empty

THEN Add comment saying "Parent Key is empty"
AND STOP

THEN Do the rest of the thing
AND So on

Is this feasible? I know it's a hack. I know it's also lazy coding. (I've actually split what was an even gnarlier rule into two separate rules, to give me more nested IFs, and so I might be able to restructure it properly. But ugh. I just need a STOP.)

What do you think @Bill Sheboy - know of any actions that are guaranteed to FAIL? :-}

1 answer

1 vote
Andrea Mura
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 Champions.
July 30, 2026

 

Hi! The BASIC instinct is totally valid here. 🙂

I wouldn't recommend intentionally making the rule fail. Using a failing action (such as a broken web request) will mark the rule as an error in the audit log, making it much harder to troubleshoot later.

In my opinion a cleaner approach is to structure the rule using an IF / ELSE IF.

For example:

 

WHEN: Work item created

IF Parent Key is empty
    THEN Add comment: "Parent Key is empty"

ELSE IF Parent Key is not empty
    THEN Do the rest of the thing
    AND So on 

With this structure:

  • If Parent Key is empty
    • The comment is added.
    • The rule reaches the end of that branch and finishes. The ELSE IF branch is not evaluated, so none of the remaining actions are executed.
  • If Parent Key is not empty
    • The first IF is skipped.
    • The ELSE IF branch is executed, and the rest of your automation runs as expected.

This gives you the "STOP" behavior you're looking for without needing a dedicated stop action or intentionally causing the rule to fail. The rule simply follows the appropriate branch and exits naturally when that branch is complete.

The only thing to watch for is whether the Parent Key has already been populated when the rule runs. If you're triggering on Work item created and that field may be set a moment later, you may need to Re-fetch work item data before checking it. Otherwise, this is a simple and clean way to implement the logic.

 

Alan Bruce
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 Champions.
July 31, 2026

Maybe instead of a comment, I would just use the 'Log Action'. Less impact on the ticket and you can test it a bit easier that way.

Another thing to watch out for is if you have another Automation that creates subtasks. You might need to check the box at the bottom of the Automation Rule Flow that states 'Check to allow other rule actions to trigger this rule. Only enable this if you need this rule to execute in response to another rule.' Test without it first and see what happens. Good luck!

Like Andrea Mura likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events