-
Bug
-
Resolution: Fixed
-
Major
-
None
-
Workflow 1.11
Jenkins 1.625.2
When triggering a parameterized job using a build step, default parameters values are not honored when explicitly setting the value of at least one parameter.
To reproduce it:
- Create a parameterized Workflow job (call it "paramd-job"), with 2 string parameters: A, with default value "A" and B with default value "B" and script echo A; echo B
- Trigger paramd-job from a second Workflow job using: build job: 'paramd-job', parameters: [[$class: 'StringParameterValue', name: 'A', value: 'Custom value']]
Expected: paramd-job triggered with A="Custom value" and B="B", both values printed in the build log.
Actual: B is not defined. groovy.lang.MissingPropertyException: No such property: B for class: WorkflowScript
- is related to
-
JENKINS-13768 default parameter values are ignored when triggering parameterized build from groovy post-build script
-
- Open
-
- links to
It is a longstanding open question in Jenkins who is supposed to handle default parameter values and to what extent they are guaranteed to be defined. There is no overall policy or enforced mechanism.