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.
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
It looks like you're new here. Sign in or register to get started.