-
Bug
-
Resolution: Fixed
-
Minor
-
None
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