Hi, everyone!
I need to update a customfield (Version Picker, id - 10049) using post function "Update Issue Custom Field" and set there "earliestUnreleasedVersion()", when somebody transit issue from one status to another.
How can I do this? Should I use REST API? Or is there easier solution?
Thanks!
Hello Igor,
As you can see on this answer, you can use the plugin Script Runner and configure the following Script to get this functionality:
import com.atlassian.jira.component.ComponentAccessor def versionManager = ComponentAccessor.getVersionManager() def projectManager = ComponentAccessor.getProjectManager() def project = projectManager.getProjectObjByKey("JRA") def versions = versionManager.getVersions(project) versions.sort {it.releaseDate}.reverse().find{! it.released}
Please, let me know if it works for you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Igor,
Unfortunately, that was the only solution I was able to find to achieving it.
Maybe there are other possible workarounds for this using other plugins, but not natively on JIRA.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Igor,
The post function Update Issue Custom Field works well to update a field with a specific value, the current user (When talking about user picker fields) and current date/time (When talking about Date/time fields), however, it does not have a macro to specifically set the earliest Unreleased Version to a field.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You are welcome, Igor.
Have a nice week!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Earning the Mindful Member badge proves you know how to lead with kindness, plus it enters you into a giveaway for exclusive Atlassian swag. Take the quiz, grab the badge, and comment on our announcement article to spread the good vibes!
Start here
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.