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

Choice Parameter - Empty option is saved but deleted when editing job next time

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Minor
    • Resolution: Cannot Reproduce
    • Component/s: core
    • Labels:
      None
    • Environment:
      v1.588
    • Similar Issues:

      Description

      I'm trying to use the choice parameter to let the user choose an ant target. I want the first (default) option to be an empty String (see screen1 in attachments how to reproduce). This seems to work fine if I click on "Save" for the first time: The job settings are set as intended (see screen2). But when I edit the job the next time, the empty option in front will automatically be deleted. Is this wanted behavior?

      I also tried the following things:

      • if I add more than one empty options in front, there will also be one empty option deleted whenever I edit the job settings
      • if the empty option is not at first position (but e.g. between target2 and target3), then the option will not be deleted

      It would be great if an empty option at the first position will be possible (and stay there when editing settings). Another use case would be to set a $branch with a choice parameter and use this for example with CVS. When the branch field is empty, CVS will automatically use Head.

        Attachments

        1. screen1.png
          screen1.png
          22 kB
        2. screen2.png
          screen2.png
          27 kB
        3. screen3.png
          screen3.png
          21 kB

          Issue Links

            Activity

            sjmk Sven K created issue -
            rupinr Rupin R Nath made changes -
            Field Original Value New Value
            Status Open [ 1 ] Resolved [ 5 ]
            Assignee Rupin R Nath [ rupinr ]
            Resolution Cannot Reproduce [ 5 ]
            rtyler R. Tyler Croy made changes -
            Workflow JNJira [ 159658 ] JNJira + In-Review [ 196157 ]
            benapgar Ben Apgar made changes -
            Link This issue relates to JENKINS-8539 [ JENKINS-8539 ]
            benapgar Ben Apgar made changes -
            Link This issue relates to JENKINS-37147 [ JENKINS-37147 ]
            benapgar Ben Apgar made changes -
            Link This issue relates to JENKINS-27505 [ JENKINS-27505 ]
            benapgar Ben Apgar made changes -
            Link This issue relates to JENKINS-37147 [ JENKINS-37147 ]

              People

              • Assignee:
                rupinr Rupin R Nath
                Reporter:
                sjmk Sven K
              • Votes:
                3 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: