How to pull "Fix Version/s" from a linked ticket?


I want to be able to automatically populate the fix version in a ticket, where the fix version is sourced from the linked ticket.

Given I have Ticket 1A and I have a ticket linked to it, let's say Ticket 1B. Is it possible to automatically pull the Fix version from Ticket 1B and copy it on to Ticket 1A once it is filled out in Ticket 1B for example? 

And if so, Is it possible to also pull from multiple linked tickets? Pull Fix Version/s from Ticket 1B, 1C, 1D, 1E and copy to Ticket 1A. 


3 answers

1 vote
Gonchik Tsymzhitov Community Champion Nov 11, 2017


it is possible. 

1. You need write a grovyy script like this


How faster do you prefer? see fix version? (like listener you need it. or service)


2. Possible another solution: it will based on automation lite for jira


Just you need understand which direction of link is main, the create a jql function and create listener or service for copy fix version value from one issue to another.


3. Possible solution it will based on other plugin: please, read below


4. you can write a some SIL script


5. Possible solution it is JS script you can include it using this plugin



Gonchik Tsymzhitov

Thanks for the prompt reply! Which option would require less development work?

Gonchik Tsymzhitov Community Champion Nov 13, 2017

You can start from 2 point, 

from automation lite for jira plugin.

For Gonchik's "Option #4", this is the SIL script you would use. (Power Scripts for Jira must be installed).

/* This script will scan all issue links of a given
issue, grab the fixVersions of the linked issue, and
append those fixVersions to the given issue.

string [] allLinkedIssues = linkedIssues(key);
for(string issue in allLinkedIssues) {
fixVersions = arraysConcat(fixVersions, %issue%.fixVersions);

You could then configure it so this script will pull in linked issue fixVersions on a workflow post-function or on an issue created / edited event listener. If you wanted to _push_ changes when a version is populated, it would be a little different.

/* This script will take the fixVersion/s of a given issue
and apply the same fixVersion/s to all linked issues.

string [] allLinkedIssues = linkedIssues(key);
for(string issue in allLinkedIssues) {
%issue%.fixVersions = arraysConcat(%issue%.fixVersions, fixVersions);

You'd then probably trigger this script from an issue created / edited event.

Hope this helps!

Hello Justin, thanks for the reply!

Another issue is the linked issue would not have the fix version until later on in the workflow for the original ticket.

Would this script continually listen and pull in the fix version when it gets filled in in any of the linked tickets? Or only when the post function triggers this script?

It sounds like you'd want to push the fixVersion changes out to all linked issues when the fixVersion field is modified. For this use case, you would use the second script above. You would then trigger the script on an "Issue Updated" event. Of course, you'd probably want to limit the scope of the script to a single project so it's not running for all projects. You could further limit by issue type or any other criteria.

if(project=="PROJ") {
[] allLinkedIssues = linkedIssues(key);
for(string issue in allLinkedIssues) {
%issue%.fixVersions = arraysConcat(%issue%.fixVersions, fixVersions);

 This will append the latest fixVersion to all linked issues of the issue that was updated. If you want to synchronize fixVersions instead of appending, you could replace line #4 with:

%issue%.fixVersions = fixVersions;

Thank you again Justin! This clears up a lot of the logic behind it. I will try this method as well as the Scriptrunner Method.

Do you know how I am able to pull in Fix version/s from linked issue(s) using script runner? It would only pull in the fix version when the linked issue(s) has updated the fix version field. This would apply within 1 project, and one specfiic issue type. How would I go about doing this? @Nic Brough [Adaptavist] 

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Jan 08, 2019 in Jira

How to Jira for designers

I’m a designer on the Jira team. For a long time, I’ve fielded questions from other designers about how they should be using Jira Software with their design team. I’ve also heard feedback from other ...

1,097 views 4 9
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you