Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Linking Issues with Matching Summary

Renee Troiani May 1, 2023

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.

1 answer

0 votes
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 7, 2023

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:

  1. Finding and extracting your "code" from the summary of an issue
  2. Finding any matching issues using JQL
  3. Linking to the issues in a way which helps solve whatever problem you are trying to solve
  4. Deciding when to do this: only at issue create, or also when issues are edited to change the summary

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

Renee Troiani May 8, 2023

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.

Like Bill Sheboy likes this
Sofia Shaldikova August 17, 2023

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 

Renee Troiani August 17, 2023

Hi @Sofia Shaldikova

 

Screen Shot 2023-08-17 at 8.23.32 AM.pngScreen Shot 2023-08-17 at 8.21.20 AM.png

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. 

Like # people like this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events