Could not reproduce in my environment. Tested with Jenkins 1.580.1 and Firefox 36.0.1.

  1. Install extensible-choice-parameter-1.2.2.
  2. Go to Manage Jenkins > Configure System.
  3. Define a globel choice parameter "GLOBAL_PARAM1" with its choices
    value1
    (blank line)
    value2
    (blank line)
    value3
    
  4. Create a new free style project "test"
    • Check "This build is parameterized" and add an "Extensible Choice":
      • Name: PARAM1
      • Choice Provider: Global Choice Parameter
        • Name: GLOBAL_PARAM1
        • Default Choice: value2
    • Add "Execute shell"
      echo ${PARAM1}
      
  5. Click "Build with Parameters"
    • Result: "value2" is selected for "PARAM1"
  6. Run the build
    • Result: "value2" is output in its build log.
Change By: ikedam (17/Mar/15 9:51 PM)
Summary: The global choice parameter Blank value  is  keeping empty lines  selected by default in global choices

        
Description: {quote}
So, when you have a blank line in the choice parameter, then even with a default value in the job configuration, this (or one) blank line will be selected by default. In my use-case, the blank line was created by the last \n of the configuration.
{quote}

----

Currently, the plugin is keeping all empty lines from the textarea. I do understand from the unit-test class {{TextareaStringListUtilityTest}} that it is a desired behavior but it is breaking the build even when the "empty line" is just the end of the choices.

I created the [PR-10|https://github.com/jenkinsci/extensible-choice-parameter-plugin/pull/10] to change this behavior.
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

--
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to