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

Boolean input parameter ignores default value of false

      If your pipeline groovy script has an input step which is a BooleanParameterDefinition, the default value is always true. Setting the default value to false has no effect.

      Example generated by snippet generator:

      input id: 'Test', message: 'testing123', ok: 'Deploy', parameters: [[$class: 'BooleanParameterDefinition', defaultValue: false, description: '', name: 'test']]
      

          [JENKINS-36543] Boolean input parameter ignores default value of false

          Niko Konstantakos created issue -
          Niko Konstantakos made changes -
          Component/s New: workflow-plugin [ 18820 ]
          Component/s Original: core [ 15593 ]
          Niko Konstantakos made changes -
          Description Original: If your pipeline groovy script has an input step which is a BooleanParameterDefinition, the default value is always true. Setting the default value to false has no effect.

          Example generated by snippet generator:
          input id: 'Test', message: 'testing123', ok: 'Deploy', parameters: [[$class: 'BooleanParameterDefinition', defaultValue: false, description: '', name: 'test']]
          New: If your pipeline groovy script has an input step which is a BooleanParameterDefinition, the default value is always true. Setting the default value to false has no effect.

          Example generated by snippet generator:
          {{input id: 'Test', message: 'testing123', ok: 'Deploy', parameters: [[$class: 'BooleanParameterDefinition', defaultValue: false, description: '', name: 'test']]}}
          Niko Konstantakos made changes -
          Description Original: If your pipeline groovy script has an input step which is a BooleanParameterDefinition, the default value is always true. Setting the default value to false has no effect.

          Example generated by snippet generator:
          {{input id: 'Test', message: 'testing123', ok: 'Deploy', parameters: [[$class: 'BooleanParameterDefinition', defaultValue: false, description: '', name: 'test']]}}
          New: If your pipeline groovy script has an input step which is a BooleanParameterDefinition, the default value is always true. Setting the default value to false has no effect.

          Example generated by snippet generator:
          {code:java}
          input id: 'Test', message: 'testing123', ok: 'Deploy', parameters: [[$class: 'BooleanParameterDefinition', defaultValue: false, description: '', name: 'test']]
          {code}

          Rupin R Nath added a comment -

          I tried in Jenkins 2.13-SNAPSHOT build. I did not face any such issue.

          Rupin R Nath added a comment - I tried in Jenkins 2.13-SNAPSHOT build. I did not face any such issue.
          Rupin R Nath made changes -
          Assignee New: Rupin R Nath [ rupinr ]
          Resolution New: Cannot Reproduce [ 5 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 173256 ] New: JNJira + In-Review [ 199424 ]
          Andrew Bayer made changes -
          Component/s New: pipeline-general [ 21692 ]
          Andrew Bayer made changes -
          Component/s Original: workflow-plugin [ 18820 ]
          Hendrik Brinkmann made changes -
          Attachment New: checkbox.png [ 33956 ]

            jbq jbq
            nkonstantakos Niko Konstantakos
            Votes:
            6 Vote for this issue
            Watchers:
            15 Start watching this issue

              Created:
              Updated: