Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-31897

Default parameter value is not used

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major 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:

      1. 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
      2. 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

            amuniz Antonio Muñiz
            amuniz Antonio Muñiz
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: