-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Minor
-
Component/s: active-choices-plugin
I am using an Active Choices Reactive Reference Parameter to render HTML inputs.
In the HTML, if I set the input type to text, the values are passed along to the pipeline correctly.
If I set the input type to checkbox, the values are not passed along, only true/false.
The desired behaviour does work as expected if I use a regular Active Choices Parameter with 'Choice Type' set to checkboxes, however this does not allow me to use custom HTML.
Â
WORKS: Groovy script (Regular Active Choices Parameter):
return ['dog', 'cat', 'mouse']
Â
NOT WORKING: Groovy script (Reactive Reference - Formatted HTML):
options = ['dog', 'cat', 'mouse'] output = "" options.each { thing -> Â Â output += """<input type="checkbox" name="value" value="${thing}">${thing}<br/>""" } return output

Sample pipeline:
Â
pipeline {
  agent any
  stages {
    stage('Test checkboxes') {
      steps {
        echo "ACTIVE: ${params.ACTIVE_CHECKBOXES}"
        echo "REACTIVE: ${params.REACTIVE_CHECKBOXES}"
      }
    }
  }
}
Â
Run pipeline:

Â
Output:
[Pipeline] stage
[Pipeline] { (Test checkboxes)
[Pipeline] echo
ACTIVE: cat,mouse
[Pipeline] echo
REACTIVE: true,true,false
Â
More info:
If I change the input type to 'radio' or 'text', behaviour is again as expected.

[Pipeline] echo REACTIVE: dog

[Pipeline] echo REACTIVE: dog,cat,mouse
- duplicates
-
JENKINS-43573 Build form value different than parameter passed to the build
-
- Resolved
-