Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,555,109
Community Members
 
Community Events
184
Community Groups

In Jira Automation, how can I do a branch, and then come back to the main path?

I have an automation rule that looks like this:

Jira Branch Automation Question.jpg

The value for the Smart Value Variables comes from this smart value: {{lookupIssues.Story Points.sum|0}}

The Next thing I want to do is send a single email with both the ToDoStoryPoints andInProgressStoryPoints, but when I have the email action on the leftmost path, the smart value variables are empty as they haven't been calculated (or aren't available on that path?).  

Is it possible to have the For JQL branch processed, wait til it's done so the variables have the data, then go back and continue with the next branch, and then go back and send the email on the leftmost path? (like on the red arrows in the screenshot)

Or some other way to have those values available to put in a single email once everything is calculated?

TIA!

 

1 answer

1 accepted

3 votes
Answer accepted
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.
Apr 20, 2023

Hi @Cash Coyne 

No, that is not possible yet, and it may not be necessary for your scenario.

First thing, branches on one-and-only-one issue (e.g., branch on parent) get run in-line, as if there was no branch.  Branches which could be on multiple issues/things (e.g., JQL, linked issues, etc.) are run asynchronously and in parallel.  There is no guarantee when the branch will end or the order of processing...right up to the last step in the rule.  https://support.atlassian.com/cloud-automation/docs/jira-automation-branches/#Ordering-of-branch-executions

I recall there is a suggestion to add an option to pause process until a branch ends, like for web requests.

Next, because of the multi-issue branch, creating a variable in the branch means it will not be visible outside of the branch...it will be repeatedly recreated from scratch and thrown away with each loop.

Back to your scenario...it seems you want to query and then count some issues, based on some criteria.  You could use Lookup Issues by itself to get the counts by just supplying the JQL for the query, and then store that in the created variable for later use.

Kind regards,
Bill

Not sure I follow on your alternate method.

I have two different queries which will return two completely different sets of issues. I don't see how I can create a variable from a JQL search in a single component.  And if I do the first search, create the first variable, then do the second search, wouldn't that only search the set of issues which is the first search which will contain none of the issues that I want for the second search?

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.
Apr 20, 2023

You cannot, but you can use the Lookup Issues action as many times as you want.  Such as:

  • action: lookup issues with JQL to find issues in set 1
  • action: create variable to save your count
  • action: lookup issues with JQL to find issues in set 2
  • action: create variable to save another count
  • etc.

You could also use math operations and smart value, list filtering to count on a single result set.  An example of this is to count issues with different status values...but everything else is the same.

Like Trudy Claspill likes this

Yes @Bill Sheboy , this worked.  Thank you!

Between you and @Trudy Claspill I have been successfully educated on the lookup issues action!

Like # people like this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events