Hello everyone,
I am currently using Jira Cloud and i am using a team managed project.
I am looking for a way to automatically link issues based on the similarity of their summaries. Specifically, when a new issue is created in the 'Operations' project, I want to automatically link it to any existing issues in the 'Rental Properties' project that have a similar summary. I define 'similar' as having around a 50% match in the text.
The direction of the linking is not a primary concern as long as I can see the linked issues from the 'Rental Properties' project. The automation should run every time a new issue is created in the 'Operations' project, and the linked issues should only be those that are currently in 'To Do' status. If possible, I'd like the new issue to be linked to all matching issues in the 'Rental Properties' project.
I have explored a few different options, including using Jira's built-in automation tools and the ScriptRunner add-on, but I haven't found a solution that meets all of my needs. Manual linking is not an ideal solution due to the volume of issues.
Any guidance or suggestions you can provide would be greatly appreciated. Thank you in advance for your help.
Hello @jeffrey11385
Welcome to the Atlassian community.
Can you provide more information about what you mean by a 50% match of the text?
In Automation Rules you can check if a text field contains text. You can use wild cards and regex, but you have to provide some interpretable instruction that can be used to determine that there is a 50% match.
@Trudy Claspill thank you for pointing that out. i added that if anyone asked "How similar should the issue summary be in order for the automaton to work?"
but i'm still new to automations, so i know Jira has built in Automations then there are Apps, i'm not sure which would allow what i am trying to accomplish.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Automation can be used to link an issue to other issues just after it is created. But I don't know if Automation can accomplish this based on your 50% match requirement without you specifying exactly what that means.
There are probably apps that also can create the links automatically, but with those there is the same question of needing a better definition for what 50% match means to determine if any apps can meet the requirement.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
so without the 50% match, is it possible to do it between "Team managed projects" ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes.
However...
This requires a multi-project rule. Multi-project rules can be created only by Jira Administrators.
The rule would looks something like this:
The rule is triggered when an issue is created in one of the projects specified as in scope on the Rule Details page.
The first Condition checks that the issue creation that triggered the rule was for an issue in 'Operations' project (different name in my example).
You then create a Branch / Related Issues / JQL component and insert a JQL statement to find the issues in your 'Rental Properties' project to which you want to link the newly created issue.
Inside that branch you add the step to link each issue found by that JQL to the issue that triggered the rule.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
this rule works! however the issue that i am running into is with the wildcard. i had to test it with a practice with this JQL query:
" project = "Rental Properties" AND issuetype = Task AND summary ~ "266 Gordon*" "
i had to add information of a specific issue in order to match them. is it possible to have them match so long as they are similar?
example:
Rental Properties: "123 example st, city, state"
Operations new issue: "123 example - work order #1234"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can dynamically pull a portion of the source issue's Summary to use in the comparison so that you don't have to enter explicit text to compare.
What part of the source issue's Summary do you want to use? Is that portion always going to be in the same location; i.e. the first X number of words? Will there be characters that bracket the portion you want to use (like parentheses)?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
do you mean like rename the source issue in rental properties like this:
"Rental - 266 Gordon"
then search for this query:
project = "Rental Properties" AND issuetype = Task AND summary ~ "Rental*"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Currently im trying to link new issues to my managed issues. IF they are named similarly. i even tried adding a "IF" condition to seperate them but they are all being linked no matter the difference in summary so long as one matches it links all related queries
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In the rule you have shown there is nothing that is comparing the Summary value of the trigger issue to the Summary value in the related issues. That is why all related issues are being linked to the trigger issue.
What I am suggesting is this:
If your OPS project issues have the Summary value set in a consistent manner then you can pull the value from the Summary of that issue and use that to look for "Rental Properties" issues that have the same text.
For example, let us say that the Summary field of your OPS issues always has house number and street as the first two "words" in the Summary; i.e.:
266 Gordon Street
232 Garden Avenue
In your Automation Rule you can pull the first two "words" from that Summary using a pattern matching function and store them in a variable.
(You can find information about manipulating text values in Automation Rules here.)
Here is an example. In this rule I will print the trigger issues Summary field, then create a variable and extract the first two "words" from the Summary, and then I will print the extracted text that I stored in the variable.
For ease in copy/paste, here is what I put in the Smart Value field:
{{issue.Summary.match("(^\d+\s\w+\s)")}}
Here is the result in the rule execution audit log.
You can then use that variable in your For JQL to see if the related issues contain that text in their own Summary.
summary ~ "{{NumberAndStreet}}"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Trudy Claspill you are amazing!! i had to do a bit of research but i was able to remove the space in between the smartvalue and the wildcard and the solution was to use the "trim()":
"project = "Rental Properties" AND summary ~ "{{issue.Summary.match("(^\d+\s\w+\s)").trim()}}*""
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.