Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Behaviors - How to restrict versions to unarchived?

Jiri March 2, 2020

How to restrict versions to only unarchived based on this script?


// Sets versions
import com.atlassian.jira.component.ComponentAccessor
import com.onresolve.jira.groovy.user.FieldBehaviours
import groovy.transform.BaseScript

import static com.atlassian.jira.issue.IssueFieldConstants.AFFECTED_VERSIONS

@BaseScript FieldBehaviours fieldBehaviours

def versionManager = ComponentAccessor.getVersionManager()

def issueTypeField = getFieldById(AFFECTED_VERSIONS)
def fieldOptions = versionManager.getVersions(issueContext.projectObject)
def availableOptions = []

availableOptions.addAll(fieldOptions.findAll {"T24 Transact") })



0 answers

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events