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?
It's because of your branch, anything within it will run on the issue(s) returned by the JQL and not the issue that triggered the automation. Instead of using the JQL branch, have you tried using the lookup issues action and then check the size returned?
Thanks for the quick reply. I was (of course!) using a copy of an existing rule and assuming I could reverse the sequence it worked on. I'll take a look at the lookup issue action.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Still having problems getting this to work, so hopefully I am missing something basic.
Scenario:
I am hoping to get the rule to work against multiple alerts of this type with different subject lines. Sample subject: "RealTimeDA-yyy - ACTIVATE Process Start Error". yyy can be variable length depending on the process being run.
When a new issue is created, I want to look for existing open issues with the same data from the yyy onward.
This is essentially what I want the Lookup issues JQL to be so that, if the lookupissues.count > 1, I can close this new issue being created:
created >= -50m AND status != "Done" AND "{{issue.summary.substringAfterLast("RealTimeDA-")}}" ~ <already existing issue summary substring of "yyy - Activate Process Start Error">
I have tried setting the alternative summary of the issue being created to the same substringAfterLast value, but I can't get a compare to work with that value being passed in.
Any suggestions on how to get the summary substring value from the issue being created to be used in the "Lookup Issues" for a matching summary substring?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Try this query instead:
created >= -50m AND status != "Done" AND summary ~ "\"{{issue.summary.substringAfterLast("RealTimeDA-")}}\""
This should do the trick for you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I also agreed with what @Mikael Sandberg stated. The triggering issue is the key. Here are the reference on Lookup Issue Action -
https://support.atlassian.com/cloud-automation/docs/jira-automation-actions/#Lookup-issues
Hope this also helps.
Best, Joseph Chung Yin
Jira/JSM Functional Lead, Global Technology Applications Team
Viasat Inc.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.