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

Active Choices Reactive Parameter has no value although there is a selected choice

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major Major
    • active-choices-plugin
    • None
    • Jenkins.war version 1.617 with updated to the latest version plugins;
      Active Choices Plug-in version 1.1;
      Validating String Parameter Plugin version 2.3;
      Java version 1.8.0_35.

      Created an Active Choices Reactive Parameter with radio-buttons output. The Groovy code always marks the first radio-button as selected by adding ":selected" in the result.

      The problem is that If the user does not change the (automatic) selection the AC Reactive Parameter has no value. If the user changes the (automatic) selection the parameter provides the user selected value. In case the AC Reactive Parameter generates a single choice the user will not be able to enforce a change, therefore the parameter will never have a value.

      Here is an excerpt from the code (see the attached file for the full project):

      if ( validStr != null ) {
        ...
        result[0] += ":selected"; //Select the first choice by default
      }
      
      return result;
      

            kinow Bruno P. Kinoshita
            mmaker1234 Monique Maker
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: