Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Link issues that have the same value of a custom field

Mary Gell
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 7, 2019

We have a custom field for 'fund id' (single line alphanumeric).

I want to link any new ticket created as 'relates to' to the other tickets that exist with exactly the same value. Eg. new ticket created with Fund Id = 15021994 should be linked to any and all other tickets with the same value for that field.

 

The apps we have available are:

  • JIRA misc workflow extensions
  • Scriptrunner
  • Automate for JIRA

1 answer

1 accepted

1 vote
Answer accepted
David Fischer
Community Champion
May 9, 2019

Hi Mary,

using JMWE, you can use the "Link issues to the current issue" post-function with a simple JQL expression:

"Fund Id" = ${issue.getAsString("Fund Id")} and issuekey != ${issue.key}
FMassaro November 22, 2019

the JQL doesn't work for me for some reason. I want to link issues that have the same value in the "Environment" custom field.

This custom field is a dropdown list.

 

I am using the JQL in this format: 

{{"Environment" = ${issue.getAsString("Environment")}}

and I am receiving the below error 

 

(string) [Line 1, Column 17]
  expected variable end

Not really a JQL expert, can you please help me out? 

 

thanks 

David Fischer
Community Champion
November 22, 2019

Are you on Jira Server or Cloud?

FMassaro November 25, 2019

Hi David,

 

I am using a Jira cloud instance

David Fischer
Community Champion
November 25, 2019

Groovy is not available on Jira Cloud. What you want is:

Environment = "{{issue.fields.Environment}}"

assuming Environment is a text field. If it's a Single-Select field, use:

Environment = "{{issue.fields.Environment.value}}"
FMassaro November 25, 2019

Thanks David, will give it a try!

Walter Lamm
Contributor
August 19, 2022

Hey @David Fischer , could you please reiterate what you suggested here? 

I want to build a rule which links the trigger issue with all issues with the same url in the custom text field "CRM-Link" (in company managed projects) and also in "CRM" (in our team managed project). 

To make it clearer:

In our team managed project the link to our CRM-projects is stored in the custom field "CRM" and in our company managed projects it is stored in the custom field "CRM-Link". I want to link all issues within one project and also with every other project. So my rule would have to compare the following depending from which project the rule is triggered:

Triggerissue "CRM" <-> other "CRM"

Triggerissue "CRM" <-> other "CRM-Link"

Triggerissue "CRM-Link" <-> other "CRM"

Triggerissue "CRM-Link" <-> other "CRM-Link"

Do you know how a solution would look like?

 

Thanks a lot!

David Fischer
Community Champion
August 19, 2022

@Walter Lamm this post is for Jira Server, so you should create a new question specific to JMWE and Jira Cloud, as the answer will be very different.

Also, please note that JMWE doesn't support team-managed projects.

Suggest an answer

Log in or Sign up to answer