jenkins-job-wrecker icon indicating copy to clipboard operation
jenkins-job-wrecker copied to clipboard

Not parsing ChoiceParameterDefinition correctly?

Open ghost opened this issue 7 years ago • 4 comments

We've got a few ChoiceParameterDefinition blocks in our source and jenkins-job-wrecker doesn't seem to be extracting the name field. This happens for all choice blocks in our project.

Input:

<hudson.model.ChoiceParameterDefinition>
  <name>MyChoice</name>
    <description>Select a choice</description>
      <choices class="java.util.Arrays$ArrayList">
          <a class="string-array">
            <string>Choice1</string>
            <string>Choice2</string>
            <string>Choice3</string>
            <string>Choice4</string>
          </a>
</choices>

Output:

    - choice:
        choices:
        - Choice1
        - Choice2
        - Choice3
        - Choice4
        description: []
        name: []

We're exporting from Jenkins ver. 2.26 with JJW installed via pip

Any ideas?

ghost avatar Mar 02 '17 16:03 ghost

Hi Chris, thanks for the report. Mind testing with v1.4.1, which I've pushed today?

ktdreyer avatar Mar 13 '17 21:03 ktdreyer

That worked. We're now seeing the Choice fields properly exported. Aside - adding a -v option would be helpful.

ghost avatar Mar 13 '17 23:03 ghost

Thanks for testing.

What exact behavior would you like to see for -v?

ktdreyer avatar Mar 13 '17 23:03 ktdreyer

Version number (spun my wheels for a few minutes before I discovered I was still testing against the previous version).

ghost avatar Mar 13 '17 23:03 ghost