Forums

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

Branch on JQL not applying actions to all found issues

Anthony Nguyen
Contributor
December 6, 2024

First, I have a branch that creates issues and tags them with a label.

Second, I have a branch that operates on JQL where the filter is 

labels in (mylabel) AND created >=-1hr

Two issues were created by the first branch, but the second branch only applies its actions to one of the issues. If I run it again, it gets the second one. Actions are to attach a form and transition the issue.

Using lookup, I can see that the filter is finding both issues so it's fine and the actions work albeit on a single issue. The problem appears to be in the second branching mechanism as it doesn't work on all issues it finds with JQL.

1 answer

1 vote
Trudy Claspill
Community Champion
December 6, 2024

Hello @Anthony Nguyen 

Welcome to the Atlassian community.

You mention you have a "first" branch and a "second" branch. Branches do not execute in sequence. Rather they execute in parallel. You cannot count on the actions of the first branch being completed before the second branch starts.

Refer to this:

https://confluence.atlassian.com/jirakb/in-the-automation-parallel-execution-of-the-branches-to-main-thread-can-produce-incorrect-unexpected-outcome-1115147731.html

If you share with us the full rule, we can offer suggestions about changing it or splitting the work into multiple rules.

Anthony Nguyen
Contributor
December 6, 2024

I was aware of this possibility so I tested it after the fact as well. That was when I discovered it addressed the other issue. Do you think it would have addressed multiple if I had more? I'll test it out.

Trudy Claspill
Community Champion
December 6, 2024

You simply cannot count on the second branch changing all the issues created in the first branch. 

You must either restructure your rule so that it does not have a branch that depends on the completion of an earlier branch, or move the functionality of the second branch to a separate rule that can be triggered by the activity of the first branch in the original rule.

Anthony Nguyen
Contributor
December 6, 2024

I meant that I tested the second branch manually as a separate rule afterwards where I can count on the first branch having already being done. I still need to experiment with more issues and see if I understand the behavior properly.

Trudy Claspill
Community Champion
December 6, 2024

I see. Thank you for clarifying.

Without knowing how you constructed the second rule I can't say if it would address all issues created by the branch in your first rule.

In your first rule are you adding the label to the newly created issue within the Create Issue action?

In your second rule is your rule using the Issue Created trigger?

Like Stefan Salzl likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events