Add fix version when closing an issue

How can I add a fix version when closing an issue based on a condition. I am using the fast track transition automation script.

1 answer

1 accepted

1 vote
Accepted answer

Add a normal post function to set the Fix version value in the workflow. When the condition is true for the fast track transition, the post function in the workflow also gets triggered while moving to new status.

In my latest script runner, I have this Additional issue action option as well. I can set the new fix version value here directly.

Add an if condition and put your setFixVersions method inside it directly or in the workflow postfunction.



I tried the following but the static type check tells me it is wrong. Not sure what the deal is.


You are almost done! 

You were passing the Fix version value here. Instead, pass the version Id. Go to your Project -> Project Administration -> Version -> Find your version 16.06.


Then click options, Ctrl+Click on Release & Build. It opens in a new page and find the version Id in the URL in address bar like '......../versions/10000 ?selectedTab.........'


Right Click on version (here test1) -> Inspect Element -> find the version Id as shown below.


Thank you it works great now

How would I modify this to automatically take the last version that I have added ? Right now the version I have added is valid until June 30th but from July 1 there will be a new version. 

Can I have some conditonal logic based on the created date to use a particular fixversion ?

Yes your logic is right, if based on the created date of version. But, finding the version date is again challenging. I would suggest to get the latest version based on the version Id (get the list, convert to long and choose the highest version)

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Nov 29, 2018 in Marketplace Apps

How to set up an incident workflow from the VP of Engineering at Sentry

Hey Atlassian community, I help lead engineering at Sentry, an open-source error-tracking and monitoring tool that integrates with Jira. We started using Jira Software Cloud internally last year, a...

1,719 views 3 11
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