Snippet editor: Invalid code for "choice" parameter/properties

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      Given I use Snippet Editor to generate code for the properties step and
      I select This project is parameterized and
      I add a new Choice Parameter
      When I enter the choices into the text area separated by line breaks and hit the Generate Pipeline Script button
      Then the emitted code includes choices: ['A', 'B', 'C'], which, however, is invalid.

      The resulting error message is:

      java.lang.ClassCastException: hudson.model.ChoiceParameterDefinition.choices expects class java.lang.String but received class java.util.ArrayList

      Instead, the valid code would be choices: ['A\nB\nC'].

            Assignee:
            Daniel Beck
            Reporter:
            Steffen Gebert
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Resolved:
              Archived: