Hi
I have spent the last week trying to get this to work, but regardless of which solutions I have tried the rule still runs the wrong segment and I am left with canceled tickets.
My use case is:
We have a monitoring job (in our own systems) running every 5 minutes, which sends a mail if a criteria is met. The mail is being sent to Jira Service Desk with a title like "Error Found (2021-09-30)".
If the error has not been fixed within 5 minutes, the same mail is sent - over and over again, untill fixed.
The receiving of the ticket, and what to label/change it to, is taken care of, but I am trying to achieve this:
When a mail comes from our monitoring system, check all existing tickets if a ticket is present with summary like "Error Found" (without the date) AND Status it not Resolved/Closed.
If a ticket is present, cancel the new incoming ticket and link to the ticket found.
If a ticket is not present, do nothing.
Even if the JQL returns 0 issues found, the incoming tickets are being cancelled and are not linked to anything.


Can anyone help me achieve my goal of
1) Searching for existing tickets with Summary = "Something" and Status NOT IN ("Statusses")
2) Perform actions on both trigger issue, and found issues, based on this search
Thank you