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

Active choice plugin 2.5.3 is not populating parameter if Choice Type is Radio Button or Checkboxes

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • active-choices-plugin
    • None
    • Jenkins 2.281
      Active Choice Plugin 2.5.3

      After upgrading active choice plugin from 2.5.1 to 2.5.3, the radio button and checkboxes choice types are not being rendered. Only "Single Select" and "Multi Select" is working.

        1. config.xml
          4 kB
        2. config-1.xml
          2 kB
        3. image-2021-02-27-22-01-17-428.png
          image-2021-02-27-22-01-17-428.png
          73 kB
        4. image-2021-02-28-11-38-17-396.png
          image-2021-02-28-11-38-17-396.png
          53 kB
        5. image-2021-03-04-13-30-26-287.png
          image-2021-03-04-13-30-26-287.png
          2 kB
        6. image-2021-03-04-13-31-00-314.png
          image-2021-03-04-13-31-00-314.png
          8 kB
        7. image-2021-03-06-15-18-47-338.png
          image-2021-03-06-15-18-47-338.png
          103 kB
        8. image-2021-03-06-17-48-51-645.png
          image-2021-03-06-17-48-51-645.png
          72 kB
        9. image-2021-03-06-18-14-05-516.png
          image-2021-03-06-18-14-05-516.png
          79 kB
        10. image-2021-03-06-18-14-55-807.png
          image-2021-03-06-18-14-55-807.png
          75 kB
        11. image-2021-03-06-18-33-32-672.png
          image-2021-03-06-18-33-32-672.png
          68 kB
        12. Selección_204.png
          Selección_204.png
          16 kB
        13. Selección_205.png
          Selección_205.png
          33 kB
        14. Selección_206.png
          Selección_206.png
          59 kB

          [JENKINS-64962] Active choice plugin 2.5.3 is not populating parameter if Choice Type is Radio Button or Checkboxes

          Bruno P. Kinoshita added a comment - - edited

          Bharat Bhatia galtor (I used JIRA's UI, but it downloaded the wrong config.xml I think, sorry Bharat!) thanks for your config.xml. The first thing I did was to open it in a text editor, look at each configuration block, and install each plug-in that you used. I am using Jenkins LTS (version in a comment above), and it selected the current versions of the other plug-ins.

          Then I created a Job JENKINS-64962-bharat, saved, and replaced my config.xml. Restarted Jenkins, and reloaded the job configuration. Had a look at the configuration, looked good. Finally, clicked on the button to build with parameters. The Final parameter was blank.

          Whenever that happens that first thing I do is check Jenkins logs, and the Scripts pending approval. We use the same security layer (Script Security plugin) as the rest of Jenkins, as well as some Markup formatting, and other security filtering from previous CVE's.

          Approving your script, then the parameters were rendered correctly.

          Could you confirm if you have the same issue? That was added after we had a security bug reported via the Jenkins Security Team. Depending on the function you have used in your scripts, your Jenkins admin may need to approve it (see script security plugin docs for more).

           

          Bruno P. Kinoshita added a comment - - edited Bharat Bhatia   galtor (I used JIRA's UI, but it downloaded the wrong config.xml I think, sorry Bharat!) thanks for your config.xml. The first thing I did was to open it in a text editor, look at each configuration block, and install each plug-in that you used. I am using Jenkins LTS (version in a comment above), and it selected the current versions of the other plug-ins. Then I created a Job JENKINS-64962 -bharat, saved, and replaced my config.xml. Restarted Jenkins, and reloaded the job configuration. Had a look at the configuration, looked good. Finally, clicked on the button to build with parameters. The Final parameter was blank. Whenever that happens that first thing I do is check Jenkins logs, and the Scripts pending approval. We use the same security layer (Script Security plugin) as the rest of Jenkins, as well as some Markup formatting, and other security filtering from previous CVE's. Approving your script, then the parameters were rendered correctly. Could you confirm if you have the same issue? That was added after we had a security bug reported via the Jenkins Security Team. Depending on the function you have used in your scripts, your Jenkins admin may need to approve it (see script security plugin docs for more).  

          xs2bharatI hope I downloaded the right config.xml. It's either yours, galtor 's I left the job name I had created, so it containsthe suffix -alberto, but ignore that part.

          Before importing it, I installed the workflow-cps plug-in and restarted Jenkins. Then replaced my job's config.xml, and restarted Jenkins once again.

          Appears to be working OK with Jenkins LTS and 2.5.4. Could you confirm if that works for you? If I have time I'll try testing with a lower version of Jenkins.

          Bruno P. Kinoshita added a comment - xs2bharat I hope I downloaded the right config.xml. It's either yours, galtor 's I left the job name I had created, so it containsthe suffix -alberto, but ignore that part. Before importing it, I installed the workflow-cps plug-in and restarted Jenkins. Then replaced my job's config.xml, and restarted Jenkins once again. Appears to be working OK with Jenkins LTS and 2.5.4. Could you confirm if that works for you? If I have time I'll try testing with a lower version of Jenkins.

          Alberto added a comment -

          Hi kinow . thanks for the response.

          The script is already aproved, with the same script and "multiselect" all is working fine. Attached pictures of "checkboxes" VS "multiselect" and js console of the checkboxes flavour in action, as you see, the script is returning right values.

          Checkboxes:

           

          Multiselect:

          JS console for checkboxes:

          if you require any further information, let me know.

           

          Regards

           

          Alberto added a comment - Hi kinow  . thanks for the response. The script is already aproved, with the same script and "multiselect" all is working fine. Attached pictures of "checkboxes" VS "multiselect" and js console of the checkboxes flavour in action, as you see, the script is returning right values. Checkboxes:   Multiselect: JS console for checkboxes: if you require any further information, let me know.   Regards  

          galtor what version of Jenkins are you using, please? Also, if you know how to use the inspection tool of the browser, are you able to navigate the DOM (click on the parameter name to start) and locate the HTML parameters list, to see whether it's empty or just hidden? That's fine if you cannot do this step, as I should be able to replicate it with the Jenkins version you are using later. Thank you.

          Bruno P. Kinoshita added a comment - galtor what version of Jenkins are you using, please? Also, if you know how to use the inspection tool of the browser, are you able to navigate the DOM (click on the parameter name to start) and locate the HTML parameters list, to see whether it's empty or just hidden? That's fine if you cannot do this step, as I should be able to replicate it with the Jenkins version you are using later. Thank you.

          Harry added a comment -

          the issue is still there when I using Active Choise Reactive Parameter.

          Plugin version: 2.5.4

          jenkins version: 2.283 (latest)

           

          after I roll back the plugin to 2.5.1, it works.

          Harry added a comment - the issue is still there when I using Active Choise Reactive Parameter. Plugin version: 2.5.4 jenkins version:  2.283  (latest)   after I roll back the plugin to 2.5.1, it works.

          Alberto added a comment -

          kinow Sorry for the delay.

           

          My Jenkins version is 2.281. In the DOM the parameter list its missing, not hidden. I also notice that if i put a script in the "Fallback Script" option its executed! But only if the "Choice Type" is "radio buttons" or "check boxes". With "Multiselect" or "Single select", main script is exec with success

          Alberto added a comment - kinow  Sorry for the delay.   My Jenkins version is 2.281. In the DOM the parameter list its missing, not hidden. I also notice that if i put a script in the "Fallback Script" option its executed! But only if the "Choice Type" is "radio buttons" or "check boxes". With "Multiselect" or "Single select", main script is exec with success

          Thanks for the version and for confirming the values are missing. The last part about the fallback script being executed only with the choice type radio/checkbox is really strange, but gives me some good ideas where to investigate the issue :o)

          Bruno P. Kinoshita added a comment - Thanks for the version and for confirming the values are missing. The last part about the fallback script being executed only with the choice type radio/checkbox is really strange, but gives me some good ideas where to investigate the issue :o)

          Bharat Bhatia added a comment - - edited

          kinow I updated jenkins to 2.284 and Active Choice Plugin 2.5.5 which fixed the issue for me.

          Bharat Bhatia added a comment - - edited kinow  I updated jenkins to 2.284 and Active Choice Plugin 2.5.5 which fixed the issue for me.

          Alberto added a comment -

          Hi kinow.

          With Jenkins 2.284 & plugin 2.5.5 problem is fixed.

           

          Thanks!

          Alberto added a comment - Hi kinow . With Jenkins 2.284 & plugin 2.5.5 problem is fixed.   Thanks!

          Thanks for confirming everything is working. We're having a few issues with this tables-to-div migration in the newer versions of Jenkins, sorry for the inconvenience. There's one more issue with this migration, so another release should be out soon.

          Bruno P. Kinoshita added a comment - Thanks for confirming everything is working. We're having a few issues with this tables-to-div migration in the newer versions of Jenkins, sorry for the inconvenience. There's one more issue with this migration, so another release should be out soon.

            kinow Bruno P. Kinoshita
            xs2bharat Bharat Bhatia
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: