Hello Atlassian Community,
I have an automation rule currently running to check for any duplicate tickets using the Lookup issues JQL which I had sorted from this previous post
project = "PSP" AND issuetype = "Service Request" AND "Customer Request Type" = "Testing Ticket" AND status in ("Waiting For Support", "Pending", "Waiting For Customer") AND resolutiondate is EMPTY and summary ~"\"{{triggerIssue.summary}}\""
Current flow of the Automation works perfectly, see attached screenshot 1 (labelled SS1).
Problem:
I have a comment action in place but I would like it to do be more specific.
I would like to have a comment generated from my current Automation rule to include:
For example,
Ticket number PSP-168 has been submitted to our queue and the summary = 0000000000 and the customer request type = Testing Ticket (see screenshot 2, labelled SS2).
I submit another ticket PSP-XYZ with summary = 0000000000 and the customer request type = Testing Ticket. The Automation in place already finds it as a duplicate and cancels it immediately.
I would like the comment generated on the duplicate ticket PSP-XYZ to say it is a duplication of ticket PSP-168 and to provide the reporter display name of PSP-168.
I currently have in the comment (see screenshot 3, labelled SS3 ):
{{#lookupIssues}} *{{key}} {{/}}
{{#lookupIssues}} *{{reporter.displayName}} {{/}}
But this displays the current PSP-XYZ and the previous PSP-168 (PSP-XYZ does have a strikethrough since its been cancelled) both with each reporter display name. If I add text before the {{key}} or {{reporter.displayName}}, it replicates this for both PSP-XYZ and PSP-168.
Is there a way to only reference the initial ticket PSP-168 from the lookup issue JQL I used earlier?
Appreciate any help on this :)
Hello @Jonathan Lewis
Add the bold text to the JQL in your Lookup Issues action:
project = "PSP" AND issuetype = "Service Request" AND "Customer Request Type" = "Testing Ticket" AND status in ("Waiting For Support", "Pending", "Waiting For Customer") AND resolutiondate is EMPTY and summary ~"\"{{triggerIssue.summary}}\"" AND key != {{triggerIssue.key}}
That will exclude the trigger issue from the results set.
Hello @Trudy Claspill
Thank you for your response.
I've added AND key != {{triggerIssue.key}} into my JQL lookup but this has caused the automation rule to not pickup the duplication until the 3rd ticket attempt (so I have a ticket sitting to be completed and another submitted/2nd with the same summary but that 2nd one is not triggered as a duplicate, third ticket submitted is picked up as a duplicate).
Then the second ticket that was submitted is appearing on the comment as well as the reporter display name.
Same again happens for submitting more tickets with the same summary, it looks like it has to have 2 tickets in the queue before the duplication can be picked up?
See screenshot attached, {{key}} & {{reporter.displayName}} should only be showing in the green highlight and the red highlight will be the duplicate not show in the comment.
Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sorry, I missed saying that you also have to change the Condition after the Lookup to be greater than 0 rather than greater than 1 in order to get the email when the first duplicate is created. And I recommend that you change the smart value in that condition to
{{lookupIssues.size|0}}
Unexpected things can happen with the size attribute if no issues are found. The code |0 tells the condition to use size if it is not null and to use 0 if size is null.
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.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.