We are using JSM to create issues based on alert emails received from legacy applications, and then send the on-call team alerts through OpsGenie. Some will send alerts every 5 minutes until the issue is resolved, so I am trying to close out new issues if the previous one for the same email subject is still open.
I have an automation rule that is looking for previous versions of the email subject line. The JQL retrieves an open ticket, but then closes the oldest ticket and not the new one. So, a second alert is sent to OpsGenie for the new ticket.
The automation log clearly shows the fact that it is working on the older of the 2 issues. How can I force the Edit and Transition steps after the JQL to work on the new issue?

