Need help with implementing a behavior that will only show version with Unreleased status in the Fix Versions field.
you need to do some prerequisites:
1. Download Adaptivist ScriptRunner (+ Behaviour)
2. click on "Manage Apps" -> "Behaviours"
3. Under "Behaviour Settings" make sure you delete/remove any initialisers if they exist
4. Under "Fields" select Fix Versions
5. Under "Fields" select Affects Versions.
6. on both oaccasions, create aserver side script.
7. on both occasions, copy the following script:
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.customfields.option.Option
import com.atlassian.jira.project.version.VersionManager
def versionManager = ComponentAccessor.getVersionManager()
def fixver = getFieldById("fixVersions")
def affver = getFieldById("versions")
Long projectId = issueContext.projectObject.id
boolean includeArchived = false
List<VersionManager> versions=versionManager.getVersionsUnreleased(projectId,includeArchived) as List
affver.setFieldOptions(versions)
fixver.setFieldOptions(versions)
8. Save
9. Add Mappings
10. Map it to "All projects", "All Issue types"
11. Save
Thats it.
This is amazing, but is there anyway to correct the sorting problem? When you start typing to search for a fix version it puts the version at the bottom of the list so the user has to scroll to the bottom to select the 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.