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:
- The Jira Ticket number which the duplication is based off
- And the reporter name of the Jira Ticket number which the duplication is based off.
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


