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.
Untitled.png
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I tried the following but the static type check tells me it is wrong. Not sure what the deal is.
issueInputParameters.setResolutionId('1') issueInputParameters.setFixVersionIds(16.06)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
Untitled.jpg
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.........'
OR
Right Click on version (here test1) -> Inspect Element -> find the version Id as shown below.
Untitled.png
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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 ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.