Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

Link issues that have the same value of a custom field

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

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}

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? 



Are you on Jira Server or Cloud?

Hi David,


I am using a Jira cloud instance

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}}"

Thanks David, will give it a try!

Hey @David Fischer _Appfire_ , 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!

@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