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

Extensible Choice Parameter plugin overrides "Top Most Value" with blank value

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      After configuring a job that uses the Extensible Choice Parameter plugin, I noticed that Jenkins automatically decided to override the Default Choice value from <Top Most Value> to an empty String. It looks like the defaultChoice tag is being added between configuration changes. I have multiple variables that use this plugin in the same job, but it only seems to affect one (The first parameter).

      Old job config

      <name>MONGO_SERVER</name>
      <description>The Mongo server to connect to</description>
      <editable>false</editable>
      <choiceListProvider class="jp.ikedam.jenkins.plugins.extensible_choice_parameter.GlobalTextareaChoiceListProvider">
      <name>MONGO_SERVER</name>
      </choiceListProvider>
      

      New config

      <name>MONGO_SERVER</name>
      <description>The Mongo server to connect to</description>
      <editable>false</editable>
      <choiceListProvider class="jp.ikedam.jenkins.plugins.extensible_choice_parameter.GlobalTextareaChoiceListProvider">
      <name>MONGO_SERVER</name>
      <defaultChoice></defaultChoice>
      </choiceListProvider>
      

        Attachments

          Activity

          Hide
          ikedam ikedam added a comment -

          This happens when you save the configuration before the configuration page is loaded completely.
          Values for "Default Choice" are loaded dynamically and "Default Choice" gets empty before they are loaded.

          I'll see whether I can resolve this issue.

          Show
          ikedam ikedam added a comment - This happens when you save the configuration before the configuration page is loaded completely. Values for "Default Choice" are loaded dynamically and "Default Choice" gets empty before they are loaded. I'll see whether I can resolve this issue.
          Show
          ikedam ikedam added a comment - https://github.com/jenkinsci/extensible-choice-parameter-plugin/pull/25
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: ikedam
          Path:
          src/main/java/jp/ikedam/jenkins/plugins/extensible_choice_parameter/GlobalTextareaChoiceListProvider.java
          src/main/java/jp/ikedam/jenkins/plugins/extensible_choice_parameter/SystemGroovyChoiceListProvider.java
          src/main/java/jp/ikedam/jenkins/plugins/extensible_choice_parameter/TextareaChoiceListProvider.java
          src/main/resources/jp/ikedam/jenkins/plugins/extensible_choice_parameter/GlobalTextareaChoiceListProvider/config.jelly
          src/main/resources/jp/ikedam/jenkins/plugins/extensible_choice_parameter/SystemGroovyChoiceListProvider/config.jelly
          src/main/resources/jp/ikedam/jenkins/plugins/extensible_choice_parameter/TextareaChoiceListProvider/config.jelly
          http://jenkins-ci.org/commit/extensible-choice-parameter-plugin/8c02e0d2f8d5306e703d0d7f9538ca6d49867d41
          Log:
          [FIXED JENKINS-37147] FIXED: "Top Most Value" is replaced with an empty value when the page load is slow

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: ikedam Path: src/main/java/jp/ikedam/jenkins/plugins/extensible_choice_parameter/GlobalTextareaChoiceListProvider.java src/main/java/jp/ikedam/jenkins/plugins/extensible_choice_parameter/SystemGroovyChoiceListProvider.java src/main/java/jp/ikedam/jenkins/plugins/extensible_choice_parameter/TextareaChoiceListProvider.java src/main/resources/jp/ikedam/jenkins/plugins/extensible_choice_parameter/GlobalTextareaChoiceListProvider/config.jelly src/main/resources/jp/ikedam/jenkins/plugins/extensible_choice_parameter/SystemGroovyChoiceListProvider/config.jelly src/main/resources/jp/ikedam/jenkins/plugins/extensible_choice_parameter/TextareaChoiceListProvider/config.jelly http://jenkins-ci.org/commit/extensible-choice-parameter-plugin/8c02e0d2f8d5306e703d0d7f9538ca6d49867d41 Log: [FIXED JENKINS-37147] FIXED: "Top Most Value" is replaced with an empty value when the page load is slow
          Hide
          ikedam ikedam added a comment -

          Fixed in extensible-choice-parameter 1.3.3.
          It will be available in the update center in a day.

          Show
          ikedam ikedam added a comment - Fixed in extensible-choice-parameter 1.3.3. It will be available in the update center in a day.
          Hide
          cwcam Cam Spencer added a comment -

          Thanks ikedam!

          Our next infrastructure update isn't until next month, so I won't be able to test the fix until then.

          Show
          cwcam Cam Spencer added a comment - Thanks ikedam ! Our next infrastructure update isn't until next month, so I won't be able to test the fix until then.

            People

            • Assignee:
              ikedam ikedam
              Reporter:
              cwcam Cam Spencer
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: