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

Behaviours - Restrict component list based on another field

Jiri Kanicky February 27, 2020

I am trying to restrict component list field based on Product field, using example in here

Any idea why its not working?

If product field = Infinity Fabric
   List only "App Viewer" component

import com.atlassian.jira.component.ComponentAccessor
static com.atlassian.jira.issue.IssueFieldConstants.*

def productField = getFieldById(getFieldChanged())
def selectedOption = productField.getValue() as String

if (selectedOption == "Infinity Fabric") {
def constantsManager = ComponentAccessor.constantsManager
def allowedComponents = constantsManager.components.findAll { in ["App Viewer"]



0 answers

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events