parameters {
extendedChoice name: 'SELECTED_RESOURCE_LABEL', bindings: '', description: 'Select test device from accessible resources', groovyClasspath: '', multiSelectDelimiter: ',', quoteValue: false, saveJSONParameterToFile: false, type: 'PT_SINGLE_SELECT', visibleItemCount: 5, groovyScript: ''' import org.jenkins.plugins.lockableresources.LockableResourcesManager return new ArrayList<String>(LockableResourcesManager.get().getAllLabels());'''
extendedChoice name: 'SELECTED_BUILD', description: 'Job from rpms are taken', type: 'PT_SINGLE_SELECT', bindings: '', groovyClasspath: '', multiSelectDelimiter: ',', quoteValue: false, saveJSONParameterToFile: false, visibleItemCount: 5, groovyScript: ''' import jenkins.* import jenkins.model.* import hudson.* import hudson.model.* def projList = Jenkins.instance.getAllItems(AbstractItem.class).name projList.removeAll { it.contains("label=") }; projList.removeAll { !it.contains("build") }; return projList;'''
booleanParam name: 'FLASH', defaultValue: false, description: "Re-flash device with clean image"
booleanParam name: 'RUN_TESTS', defaultValue: false, description: "Disable tests for projects which don't has any tests specified yet"
booleanParam name: 'INSTALL_RPMS', defaultValue: true, description: "Allows you to bypass the installation process"
}
I attached some screen shots illustrating the problem. A simple choice parameter with a list of choices generated by a groovy script. When using the /build URL for the job, the choices are rendered correctly. When using the /parambuild URL they are not. When the parameter type is 'active choices parameter' it appears as though the Groovy script does get executed but only the first choice from the list appears in the text entry field. When the parameter type is 'active choices reactive parameter' the form element is still rendered as a text entry field but there is no default value provided.