// customfield System Subtype import com.onresolve.jira.groovy.user.FieldBehaviours import groovy.transform.BaseScript import static com.atlassian.jira.issue.IssueFieldConstants.* import com.atlassian.jira.component.ComponentAccessor @BaseScript FieldBehaviours fieldBehaviours def systemSubtypeField = getFieldByName("System Subtype") def customFieldManager = ComponentAccessor.getCustomFieldManager() def optionsManager = ComponentAccessor.getOptionsManager() def customField = customFieldManager.getCustomFieldObjectByName("System Subtype") def config = customField.getRelevantConfig(getIssueContext()) def options = optionsManager.getOptions(config) // Filter options def allowedValues = ["Application Function", "Component", "Microservice", "Module", "NUDD", "Tool", "None"] def filteredOptions = options.findAll { it.value in allowedValues } systemSubtypeField.setFieldOptions(filteredOptions)
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter