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

"choice" parameter should take array for choices argument

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Component/s: core
    • Labels:
      None
    • Environment:
      pipeline:2.4
      pipeline-model-definition-plugin:0.8.1
    • Similar Issues:

      Description

      This is what I have to do now:

      pipeline {
          agent any
          parameters {
              choice(
                  // choices must be newline separated
                  choices: 'greeting\nsilence',
                  description: '',
                  name: 'REQUESTED_ACTION')
          }
      }
      

      This is what I should be able to do:

      pipeline {
          agent any
          parameters {
              choice(
                  choices: ['greeting','silence'],
                  description: '',
                  name: 'REQUESTED_ACTION')
          }
      }
      

        Attachments

          Issue Links

            Activity

            Hide
            abayer Andrew Bayer added a comment -

            This isn't Declarative-specific, so moving it out of the component.

            Show
            abayer Andrew Bayer added a comment - This isn't Declarative-specific, so moving it out of the component.
            Show
            rodrigc Craig Rodrigues added a comment - Fixed in  https://github.com/jenkinsci/jenkins/commit/6de571632c3873689981c27902ae8269fdf094eb
            Hide
            rodrigc Craig Rodrigues added a comment -

            Fixed in Jenkins-2.112

            Show
            rodrigc Craig Rodrigues added a comment - Fixed in Jenkins-2.112

              People

              • Assignee:
                danielbeck Daniel Beck
                Reporter:
                bitwiseman Liam Newman
              • Votes:
                2 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: