Hello,
What rule can I create to link the following tickets or add the duplicate ones to the comment.
Hello @Kiran Venugopal
Welcome to the Atlassian community.
Have you tried to create the rule? If so, show us what you have so far.
What issue event should trigger the link creation?
Should all the issues with identical summaries be linked to each other? Or is one of them considered the "primary" to which all the others should be linked?
Hi Trudy no I have not yet, yes that's correct, all issues with the same summary should link tickets and if possible add the new ticket as comments to the primary one.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What issue event should trigger the link creation?
It looks like you have an existing set of issues that have the same summary. Are you looking for a rule that you can run now to link those all together?
Are you looking for a rule that will run whenever a new issue is created and look for other issues with the same summary, and link them?
and if possible add the new ticket as comments to the primary one.
How do you identify the ticket that is the primary ticket?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello, I'm looking for a rule that runs every time a ticket is created. The ticket comes in from another Jira instance, so the summary will be the same every time every time. We can ignore the ticket comment as if identifying the primary ticket is difficult as they are all the same
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Trudy, to add on.
I created the following rule with Jira AI which seem to be working.
Is there a way to edit this ticket, in which new tickets with the same summary that comes will get added to the primary ticket which came in first as a comment?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Add this sequence of steps to your rule:
The Lookup Issues action will search for the issues that have the same summary as the trigger issue and order them by their Created date with oldest one listed first. {{lookupIssues}} is set to the list of issues found by the JQL.
The condition checks the size of the list to confirm at least one issue was found. size is an attribute of lists.
You then use the For: Each: Related Issues: JQL to retrieve just that one oldest issue. Since {{lookupIssues}} is a list of issues you can use the first attribute to reference the first item/issue in the list. You can follow that with any attribute/field that is normally accessible for that type of item; i.e. for issues you can access key.
Lastly, within that branch, you use the Comment Issue action to add the comment to that oldest issue that you have retrieved.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Greetings!
For the JQL with the Lookup Issues action, I recommend using the exact phrase syntax for the CONTAINS ~ operator: https://support.atlassian.com/jira-software-cloud/docs/jql-operators/#CONTAINS----
project = yourProjectName
AND summary ~ "\"{{issue.summary}}\""
AND key !={{issue.key}}
ORDER BY created ASC
Otherwise the matches will be on the words within the Summary, in any order, and not the exact same Summary value. Please note well: this could lead to matches where the search text is led or followed by other text. So matching summaries could be:
Kind regards,
Bill
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.
Hi Both,
Thank you for taking the time to explain the steps to me. Is the following how it is supposed to look? I am fairly new to Jira automation so I am a little confused on the setup.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The JQL for you branch is missing the quotation marks around the project name. Please add those and then test your rule.
And...with the Issue Created trigger, I recommend adding the Re-fetch Issue action immediately after the trigger. That can prevent timing problems as that specific trigger can fire so quickly that some data may not be available to the rule yet. Re-fetch will slow the rule down a bit and reload the data before proceeding.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Bill,
Sounds good iv made the changes, can you review the screenshot below if they are looking accurate?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What happened when you tried testing the rule? What did the audit log show? Successfully using Jira Automation requires learning and experimentation, so please remember to test your rules (and their JQL).
If you look closely at that branch JQL, and tested the rule, you will see the ending quotation mark appears to be in the wrong place.
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.
As that error shows, there is also an error with the JQL for your Lookup Issues action. Please correct that to remove the stray quotation mark.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey Bill,
Yes, I fixed the quotation mark issue yesterday, and the audit logs started showing success when the rule ran. However, it is not adding comments from the prior ticket with the same summary to the new ones. Based on your expertise, would you be able to take a look at the rule one more time and see if you can spot any errors/discrepancies?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please post an image of the audit log details showing the updated rule's execution. That will indicate what happened when the rule ran. Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
DPTAR-1022 and DPTAR-1021 have the same summary but description from 1021 has not been added to 1022
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Kiran Venugopal
You have a typo in this step:
The "i" in lookupissues must be capitalized: lookupIssues
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.