Forums

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

Automation branch cycle incorrect order of created tickets

Anatolii Borkhovych
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 1, 2024

I have created an automation which iterates over child issue inside parent with a help of branch.

Screenshot 2024-03-02 at 09.23.15.png

Everything works correctly except the fact that functions branch do not guarantee me the correct order of creating a child tickets.

Screenshot 2024-03-02 at 09.23.59.png

Is there a way to wait for a ticket creation on previous branch iteration before proceeding to the next in cycle?

 

3 answers

0 votes
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 2, 2024

Hi @Anatolii Borkhovych -- Welcome to the Atlassian Community!

Adding to the other answers...that is not possible using that branch type.

Branches which could be on more than one thing (such as on Subtasks) are executed in parallel and asynchronously.  And there is no guarantee when the branch will complete, up to the last step of the entire rule.  Please look here to learn more: https://support.atlassian.com/cloud-automation/docs/jira-automation-branches/#Ordering-of-branch-executions  I recall there are open suggestions to add an option for sequential processing, and / or "wait until done processing".

What this means for your rule is the subtasks are cloned as fast as possible, in no defined order.

Some work-arounds for this behavior are:

  • If you have a known number of subtasks, you may "unroll" your loop by adding them one by one, without the branch.  This technique would use Lookup Issues to load the subtask's data, and then select each one for cloning by copying the fields or branching.
  • Build your own application to clone, calling the REST API functions, using a programming language which supports sequential processing.
  • Investigate a marketplace addon specifically for cloning issues.  Ordering issues is probably one of the primary reasons these addons exist.
  • Use an elaborate self-triggering rule mechanism, which incrementally adds each next subtask.  This is a risky and brittle approach, so I would not recommend it.  It could also shut down your rule processing due to throttling.

Kind regards,
Bill

0 votes
Ste Wright
Community Champion
March 2, 2024

Hi @Anatolii Borkhovych 

You can try adding one (or multiple) "Re-fetch issue data" actions between each action, to try and push the order.

No guarantees though.

Ste

0 votes
John Funk
Community Champion
March 2, 2024

Hi Anatolii - Welcome to that Atlassian Community!

Unfortunately, no there is not a way to control that. Automation does things in the order it wants to do them. 

Suggest an answer

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

Atlassian Community Events