I need to develop a script which will allow to display only specific values (B2,B3)from a select list B when A1 value has been selected in field A.
Hello Lynn.
The way that you would apply this would be depending wether your fields are statically or dynamically populated.
If they are statically populated you can use a custom field that is a cascading select. If you don't know how to set one up, let me know and I will prep a documented example for you.
If they are dinamically populated you might need to use something like we have in our documentation here.
if (getActionName() == "Terminate") {
def constantsManager = ComponentAccessor.getConstantsManager()
//Here you filter from your options def allowedResolutions = constantsManager.getResolutionObjects().findAll { it.name in ["Won't Fix", "Incomplete", "Cannot Reproduce"] }
//here you restrict your options with setFieldOptions getFieldById(RESOLUTION).setFieldOptions(allowedResolutions) }
In the example, they are dependent on the action name(line 1 of the script), but you can make them dependent on a field value with getFieldValue(). If you need further help please don't hessitate to ask.
Cheers
DYelamos
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.