It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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!

Suggest an answer

Log in or Sign up to answer

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you