We receive multiple emails that create tickets with a similar summary. Each summary contains a code such as "MEETING 2023-L567". If I want to lookup existing issues whose summary contains that code and then link the new issue to the existing issue, how would I do that?
To reiterate, I would want the automation to take the summary, compare it to all other issue summaries, find an issue with the same code in the summary, then link those two issues together.
I'm trying to use the "Lookup Issues" action but am not sure what to put for the JQL so that it can dynamically link issues that contain the same summary code.
Hi @Renee Troiani -- Welcome to the Atlassian Community!
First thing, are you using Jira Cloud or Server/Data Center? And if using Server/Data Center, which version of automation do you have: pro or lite? Knowing these things will help the community to offer suggestions that can work with your version of automation rules.
I am going to assume Jira Cloud for now...
Next, there are several parts to solving your problem, including at least:
The first one requires you have a consistent format (or formats) for your code, or you will not be able to get the code in a predictable manner. If you can do that, try using the match() or other text functions to get and/or save the code. https://support.atlassian.com/cloud-automation/docs/jira-smart-values-text-fields/#match--
Once that is solved, you would use a JQL search to find matches, probably with the CONTAINS ~ operator on the summary field. If there are embedded spaces use the exact phrase syntax by wrapping the search in escaped quotation marks. https://support.atlassian.com/jira-software-cloud/docs/advanced-search-reference-jql-operators/#Advancedsearchingoperatorsreference-CONTAINS-CONTAINS--
The linking should be easy at this point, as you can branch over the relevant issue keys.
That last item is more difficult if you need to support edit of the summary. This would potentially require removing and then re-adding links to multiple issues. I recommend avoiding this scenario, unless necessary.
Kind regards,
Bill
Hi Bill,
Thank you so much for the response! I actually figured out a different method to link my issues using a custom field. I couldn't figure out how to remove my question after I figured out a solution.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Renee Troiani ,
would you mind sharing the solution you find? I'm looking for something similar - to link the issues which has values from the description of the trigger issue in the summary
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Here is a screenshot of the automation I ended up with. Basically, I used ChatGPT to give me the smart value that will extract the code from the summary and save it to a variable. That variable goes into a custom field and the issues that have matching values for that custom field are linked.
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.