Automation - ASC order in Linking Tickets

Sean McConell June 26, 2024

I have an Automation Build for a Mail Handler.  Is there a way to when Linking and Closing the duplicate tickets to Order by created ASC. I basically need to close the newest ticket and link everything back to the oldest ticket. 

 

image.png

1 answer

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.
June 26, 2024

Hi @Sean McConell -- Welcome to the Atlassian Community!

One way to do that would be to use Lookup Issues with JQL and an ORDER BY Created DESC clause, and branch using JQL to just the first item by the key to close it:

key = {{lookupIssues.first.key}}

The reason I suggest inverting the ORDER BY and using the first one is to handle the possibility there are more than 100 issues as that is the maximum a lookup can return.

Then branch to the other issues separately, perhaps using the lookup results and excluding the first one.  That will prevent the possibility of the parallel processing for branches colliding.

Kind regards,
Bill

Suggest an answer

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

Atlassian Community Events