Forums

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

Grabs issue key from field and link it

Jeremy Price January 18, 2023

Hello All,

I'm trying to grab an issue key from a custom field and then link that issue key to the original issue when it is transitioned into a specific status. 

I have JSU and JMWE and automation for Jira and for some reason, I can't get this to work. Seeing if anyone has done this before and what tools did they use to accomplish it?


I would like this is an easy thing to do but for some reason I can't find any easy automation to make this happen. 

Thanks for any help you can provide. 

2 answers

2 accepted

1 vote
Answer accepted
David Fischer
Community Champion
January 18, 2023

Hi @Jeremy Price ,

using JMWE, you can use a Link issues to the current issue post-function. The JQL Expression would be something like:

issuekey = ${issue.get("My custom field")}

where "My custom field" is the field name or ID of the custom field (of type text) that holds the issue key of the issue to link to. Of course, if that custom field is of a different type, you might need to adjust the code accordingly.

Jeremy Price January 20, 2023

@David Fischer thanks for this answer it worked great. For some reason I just couldn't get there on my own but thank you. 

1 vote
Answer accepted
Tomislav Sablic
Contributor
January 18, 2023

Hello Jeremy,

 

Other than using JSU and JMWE, you could achieve this by installing Adaptavist Scriptrunner plugin. This plugin allows you to write Groovy scripts that retreive issue keys, link them etc.

Jeremy Price January 20, 2023

Thanks @Tomislav Sablic I will look into this if I want to apply it at the global level. I have script runner available on my instance as well. 

Like Tomislav Sablic likes this

Suggest an answer

Log in or Sign up to answer