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

Active choice reactive reference parameter not working on checkbox reference

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: active-choices-plugin
    • Labels:
      None
    • Environment:
      Jenkins 2.6 (win), Active choices 1.4, Chrome 51
    • Similar Issues:

      Description

      When I create an active choices reactive reference like the wine example but using a checkbox parameter instead an single value selection it won't get updated on changing the checkboxes. If I modify the choice type of the reference parameter to single select it works.

        Attachments

        1. config[1].xml
          10 kB
        2. example.jpg
          example.jpg
          2 kB
        3. GIFrecord_2016-10-26_132739.gif
          GIFrecord_2016-10-26_132739.gif
          144 kB
        4. GIFrecord_2016-10-26_134846.gif
          GIFrecord_2016-10-26_134846.gif
          97 kB
        5. image-2017-03-30-12-27-15-823.png
          image-2017-03-30-12-27-15-823.png
          24 kB
        6. image-2017-03-30-12-27-53-554.png
          image-2017-03-30-12-27-53-554.png
          24 kB
        7. jenkins2016103101.png
          jenkins2016103101.png
          314 kB
        8. jquery.png
          jquery.png
          45 kB
        9. screenshot-1.png
          screenshot-1.png
          19 kB
        10. Screenshot from 2016-10-26 13-46-44.png
          Screenshot from 2016-10-26 13-46-44.png
          67 kB
        11. Screenshot from 2016-10-26 13-46-58.png
          Screenshot from 2016-10-26 13-46-58.png
          56 kB
        12. setup.jpg
          setup.jpg
          106 kB
        13. uno-choice-0.15-20161026.hpi
          1.73 MB
        14. uno-choice-20161029.hpi
          1.74 MB

          Issue Links

            Activity

            mattsbg Matthias Zangl created issue -
            rtyler R. Tyler Croy made changes -
            Field Original Value New Value
            Workflow JNJira [ 172817 ] JNJira + In-Review [ 184793 ]
            rubyl Ruby Langer made changes -
            Priority Minor [ 4 ] Major [ 3 ]
            ioannis Ioannis Moutsatsos made changes -
            Attachment screenshot-1.png [ 34319 ]
            ioannis Ioannis Moutsatsos made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            Hide
            ioannis Ioannis Moutsatsos added a comment -

            Could you please provide more information about the setup of your parameters. I have not been able to reproduce the issue.
            Here is my setup

            OPTION_C is a AC reactive reference, similar to how you have described it. It receives as reference parameter the check box values of OPTION_A. OPTION_C is displayed as Formatted HTML using:

            return "<b>$OPTION_A</b>"
            
            Show
            ioannis Ioannis Moutsatsos added a comment - Could you please provide more information about the setup of your parameters. I have not been able to reproduce the issue. Here is my setup OPTION_C is a AC reactive reference, similar to how you have described it. It receives as reference parameter the check box values of OPTION_A. OPTION_C is displayed as Formatted HTML using: return "<b>$OPTION_A</b>"
            ioannis Ioannis Moutsatsos made changes -
            Link This issue is duplicated by JENKINS-36868 [ JENKINS-36868 ]
            kinow Bruno P. Kinoshita made changes -
            Priority Major [ 3 ] Minor [ 4 ]
            kinow Bruno P. Kinoshita made changes -
            Status In Progress [ 3 ] Open [ 1 ]
            Hide
            kinow Bruno P. Kinoshita added a comment -
            Show
            kinow Bruno P. Kinoshita added a comment - ping Matthias Zangl
            mattsbg Matthias Zangl made changes -
            Attachment setup.jpg [ 34477 ]
            mattsbg Matthias Zangl made changes -
            Attachment example.jpg [ 34478 ]
            Hide
            mattsbg Matthias Zangl added a comment -

            Sorry for my late response.

            I just checked my setup again - I just rebuilt it because since the original request some time passed by I tried to build the same as yours (without the OPTION_B).

            And it still does not work with OPTION_A being a multiselect checkbox.

            On the chrome javascript console it keeps saying (no matter what I really select - but every click triggers those lines)

            cascading changes from parameter OPTION_A...
            Values retrieved from Referenced Parameters: OPTION_A=Alpha

            What I can't see from your example why OPTION_C is a,g instead of Alpha,Gamma - where does the mapping to the values take place? Maybe that changes something?

            As soon as I change my checkboxes to multiselect box it works again.

            Show
            mattsbg Matthias Zangl added a comment - Sorry for my late response. I just checked my setup again - I just rebuilt it because since the original request some time passed by I tried to build the same as yours (without the OPTION_B). And it still does not work with OPTION_A being a multiselect checkbox. On the chrome javascript console it keeps saying (no matter what I really select - but every click triggers those lines) cascading changes from parameter OPTION_A... Values retrieved from Referenced Parameters: OPTION_A=Alpha What I can't see from your example why OPTION_C is a,g instead of Alpha,Gamma - where does the mapping to the values take place? Maybe that changes something? As soon as I change my checkboxes to multiselect box it works again.
            Hide
            dthackery Dean Thackery added a comment -

            I'm having the same issue.

            If I set the choice type on the Active Choices Parameter to anything other than "check boxes", things seem to work ok. (i.e. - the Active Choices Reactive Parameter referencing the parameter updates correctly).

            When it is set to Check boxes, the reactive parameter honors what the default values are at startup, but will not update when they are changed.

            Show
            dthackery Dean Thackery added a comment - I'm having the same issue. If I set the choice type on the Active Choices Parameter to anything other than "check boxes", things seem to work ok. (i.e. - the Active Choices Reactive Parameter referencing the parameter updates correctly). When it is set to Check boxes, the reactive parameter honors what the default values are at startup, but will not update when they are changed.
            Hide
            kinow Bruno P. Kinoshita added a comment -

            Hi Matthias Zangl, thanks for reproducing the issue. And Dean Thackery, thanks too for confirming you also have the same issue.

            Other than Jenkins 2.6, Windows, and active-choices-plugin 1.4; any other different in the environment? Any other relevant plug-in? Specially if it is included in the job configuration. Anyone building on Linux?

            Ioannis Moutsatsos, if you have time to try to reproduce after Matthias' comment, that'd be great. I'll have some spare time during the next days to work on more issues.

            Cheers
            Bruno

            Show
            kinow Bruno P. Kinoshita added a comment - Hi Matthias Zangl , thanks for reproducing the issue. And Dean Thackery , thanks too for confirming you also have the same issue. Other than Jenkins 2.6, Windows, and active-choices-plugin 1.4; any other different in the environment? Any other relevant plug-in? Specially if it is included in the job configuration. Anyone building on Linux? Ioannis Moutsatsos , if you have time to try to reproduce after Matthias' comment, that'd be great. I'll have some spare time during the next days to work on more issues. Cheers Bruno
            Hide
            mattsbg Matthias Zangl added a comment -

            Hi Bruno,

            meanwhile we are on Jenkins 2.7.1 (updated a month ago) - still the same issue. With yesterday's demo I did a completly new job without any other plugins. Of course we've several plugins installed on our jenkins instance.

            Just let me know if you need any further details. I can also provide the XML file of the sample job although it's very primitive

            thanks,
            Matthias

            Show
            mattsbg Matthias Zangl added a comment - Hi Bruno, meanwhile we are on Jenkins 2.7.1 (updated a month ago) - still the same issue. With yesterday's demo I did a completly new job without any other plugins. Of course we've several plugins installed on our jenkins instance. Just let me know if you need any further details. I can also provide the XML file of the sample job although it's very primitive thanks, Matthias
            Hide
            kinow Bruno P. Kinoshita added a comment -

            Hi Matthias,

            Thanks for the blazing fast reply.

            You went out of you way to set up this env and reproduce the issue, and provided excellent information for us. I think now it's our turn to give it a try

            When I try to reproduce issues for Jenkins plug-ins, normally I start the plug-in in debug mode, create a job with the name of the ticket, open a notepad, and start writing everything I do, and then post it back here, plus screen shots if necessary.

            So once I have some spare time I should update this ticket with my findings too.

            Thanks heaps
            Bruno

            Show
            kinow Bruno P. Kinoshita added a comment - Hi Matthias, Thanks for the blazing fast reply. You went out of you way to set up this env and reproduce the issue, and provided excellent information for us. I think now it's our turn to give it a try When I try to reproduce issues for Jenkins plug-ins, normally I start the plug-in in debug mode, create a job with the name of the ticket, open a notepad, and start writing everything I do, and then post it back here, plus screen shots if necessary. So once I have some spare time I should update this ticket with my findings too. Thanks heaps Bruno
            Hide
            dthackery Dean Thackery added a comment -

            We're building on Linux.

            Jenkins version 2.19.1
            plugin version 1.4

            I found this morning that on a sandbox installation of Jenkins that we have, that the check box update is working. This instance is basically a mirror of our production Jenkins (which we were using to test an update of Jenkins recently, so it has all the same jobs, plugins, etc. installed on it)

            The only difference that I found was that in our sandbox (where things appear to be working), we are on older versions of the git plugin and it's dependencies.

            Versions on working system:
            git 2.4.0
            git-client 1.19.0
            git-parameter 0.4.0
            git-server 1.6

            Versions on non-working system:
            git 3.0.0
            git-client 2.0.0
            git-parameter 0.7.0
            git-server 1.7

            I don't know if this will help of not.

            -Dean

            Show
            dthackery Dean Thackery added a comment - We're building on Linux. Jenkins version 2.19.1 plugin version 1.4 I found this morning that on a sandbox installation of Jenkins that we have, that the check box update is working. This instance is basically a mirror of our production Jenkins (which we were using to test an update of Jenkins recently, so it has all the same jobs, plugins, etc. installed on it) The only difference that I found was that in our sandbox (where things appear to be working), we are on older versions of the git plugin and it's dependencies. Versions on working system: git 2.4.0 git-client 1.19.0 git-parameter 0.4.0 git-server 1.6 Versions on non-working system: git 3.0.0 git-client 2.0.0 git-parameter 0.7.0 git-server 1.7 I don't know if this will help of not. -Dean
            Hide
            dthackery Dean Thackery added a comment -

            The git plugins have no effect on this issue. I updated the plugins in our sandbox, and it still works.

            Show
            dthackery Dean Thackery added a comment - The git plugins have no effect on this issue. I updated the plugins in our sandbox, and it still works.
            Hide
            kinow Bruno P. Kinoshita added a comment -

            Running with Jenkins 1.580.1, in Eclipse/Maven, in debug mode. Using the latest from the git repository.

            Created a job, with two parameters, as in the images provided by Matthias. OPTION_A is a simple active choices, with the following script.

            return [
            'Alpha:selected',
            'Beta',
            'Gamma']
            

            Then, there is OPTION_C, which is an active reactive reference parameter. It references OPTION_A, and has the following script.

            return "<b>$OPTION_A</b>"
            
            Show
            kinow Bruno P. Kinoshita added a comment - Running with Jenkins 1.580.1, in Eclipse/Maven, in debug mode. Using the latest from the git repository. Created a job, with two parameters, as in the images provided by Matthias. OPTION_A is a simple active choices, with the following script. return [ 'Alpha:selected' , 'Beta' , 'Gamma' ] Then, there is OPTION_C, which is an active reactive reference parameter. It references OPTION_A, and has the following script. return "<b>$OPTION_A</b>"
            Hide
            kinow Bruno P. Kinoshita added a comment - - edited

            Attaching a screencast of the job in action.

            It works without any problem for me. Will produce a snapshot binary and attach it here.

            Show
            kinow Bruno P. Kinoshita added a comment - - edited Attaching a screencast of the job in action. It works without any problem for me. Will produce a snapshot binary and attach it here.
            kinow Bruno P. Kinoshita made changes -
            Attachment GIFrecord_2016-10-26_132739.gif [ 34495 ]
            kinow Bruno P. Kinoshita made changes -
            Attachment uno-choice-0.15-20161026.hpi [ 34496 ]
            Hide
            kinow Bruno P. Kinoshita added a comment -

            Attached uno-choice-0.15-20161026.hpi, which contains the same code that I used to try to reproduce the issue. Giving it a last try, by trying to run this hpi with a brand new Jenkins LTS war.

            Show
            kinow Bruno P. Kinoshita added a comment - Attached uno-choice-0.15-20161026.hpi, which contains the same code that I used to try to reproduce the issue. Giving it a last try, by trying to run this hpi with a brand new Jenkins LTS war.
            Hide
            kinow Bruno P. Kinoshita added a comment -

            Installed latest plug-in, in a brand new Jenkins 2.19.1. Attaching screen shots.

            Show
            kinow Bruno P. Kinoshita added a comment - Installed latest plug-in, in a brand new Jenkins 2.19.1. Attaching screen shots.
            kinow Bruno P. Kinoshita made changes -
            Hide
            kinow Bruno P. Kinoshita added a comment - - edited

            Followed the same steps described earlier. Copied the OPTION_A and OPTION_C scripts that were added in one of the comments above. Here's the screen cast of the result.

            Show
            kinow Bruno P. Kinoshita added a comment - - edited Followed the same steps described earlier. Copied the OPTION_A and OPTION_C scripts that were added in one of the comments above. Here's the screen cast of the result.
            kinow Bruno P. Kinoshita made changes -
            Attachment GIFrecord_2016-10-26_134846.gif [ 34499 ]
            Hide
            kinow Bruno P. Kinoshita added a comment -

            Matthias Zangl I could not reproduce the issue. Dean Thackery thank you for trying it out and confirming you were running on Linux too. Here's my set up:

            Jenkins 1.580.1 and Jenkins 2.19.1
            Plug-in version: 1.5-SNAPSHOT, latest in Git
            Linux Ubuntu 16.04.1

            So the best I can guess is that the latest code has some fix, that is not available in 1.14. If that's the case, anyone trying the attached snapshot HPI should be able to test and confirm the issue is gone

            Cheers
            Bruno

            Show
            kinow Bruno P. Kinoshita added a comment - Matthias Zangl I could not reproduce the issue. Dean Thackery thank you for trying it out and confirming you were running on Linux too. Here's my set up: Jenkins 1.580.1 and Jenkins 2.19.1 Plug-in version: 1.5-SNAPSHOT, latest in Git Linux Ubuntu 16.04.1 So the best I can guess is that the latest code has some fix, that is not available in 1.14. If that's the case, anyone trying the attached snapshot HPI should be able to test and confirm the issue is gone Cheers Bruno
            Hide
            ioannis Ioannis Moutsatsos added a comment -

            Bruno P. Kinoshita Matthias Zangl I can' reproduce the issue o Windows 10, with Jenkins 2.11 and ActiveChoices v1.4. Sorry...

            Show
            ioannis Ioannis Moutsatsos added a comment - Bruno P. Kinoshita Matthias Zangl I can' reproduce the issue o Windows 10, with Jenkins 2.11 and ActiveChoices v1.4. Sorry...
            Hide
            mattsbg Matthias Zangl added a comment -

            How can I test it with the hpi you provided? I just copied it to my plugins folder and named it uno-choice.hpi, but the plugin stopped working using the existing testcase.

            My jenkins is hosted on Windows 7 using the Jenkins Service.

            thanks,
            Matthias

            Show
            mattsbg Matthias Zangl added a comment - How can I test it with the hpi you provided? I just copied it to my plugins folder and named it uno-choice.hpi, but the plugin stopped working using the existing testcase. My jenkins is hosted on Windows 7 using the Jenkins Service. thanks, Matthias
            Hide
            kinow Bruno P. Kinoshita added a comment -

            Thanks for testing it Ioannis Moutsatsos

            Matthias Zangl, preferably in a test server, you go to the plug-in management screen, select the Advanced tab, and upload the hpi there. You can also try to manually install as you did, by placing the hpi file in the plug-ins folder, but find it easier and more reliable to install using the user interface.

            Show
            kinow Bruno P. Kinoshita added a comment - Thanks for testing it Ioannis Moutsatsos Matthias Zangl , preferably in a test server, you go to the plug-in management screen, select the Advanced tab, and upload the hpi there. You can also try to manually install as you did, by placing the hpi file in the plug-ins folder, but find it easier and more reliable to install using the user interface.
            Hide
            mattsbg Matthias Zangl added a comment -

            I installed a fresh test server on a windows 7 host with jenkins 2.19, default plugins and using active choices 1.4. And now it is working...

            I keep on testing if I can get the same behaviour on test server. Currently it is no option to upgrade the production server. But within the next couple of weeks I will upgrade our production server.

            I keep you informed about the results.

            thanks for your efforts,
            Matthias

            Show
            mattsbg Matthias Zangl added a comment - I installed a fresh test server on a windows 7 host with jenkins 2.19, default plugins and using active choices 1.4. And now it is working... I keep on testing if I can get the same behaviour on test server. Currently it is no option to upgrade the production server. But within the next couple of weeks I will upgrade our production server. I keep you informed about the results. thanks for your efforts, Matthias
            mattsbg Matthias Zangl made changes -
            Attachment jquery.png [ 34634 ]
            Hide
            mattsbg Matthias Zangl added a comment - - edited

            Good news, I think I found the responsible plugin which causes the conflict.

            Its the jquery plugin which comes with the pipeline delivery plugin. The active choice stops working when I install the jquery plugin and its working again when I uninstall it.

            Show
            mattsbg Matthias Zangl added a comment - - edited Good news, I think I found the responsible plugin which causes the conflict. Its the jquery plugin which comes with the pipeline delivery plugin. The active choice stops working when I install the jquery plugin and its working again when I uninstall it.
            Hide
            kinow Bruno P. Kinoshita added a comment -

            That's great news Matthias. Kudos for the investigate work

            And it is also interesting that the jquery plugin seems to be the issue.

            Jenkins plug-in developers use "adjuncts", which are a resource that imports an asset only once. So if two plug-ins need JQuery, what is important is that they are both using adjuncts.

            The Delivery Pipeline plug-in seems to be using adjuncts

            https://github.com/Diabol/delivery-pipeline-plugin/blob/master/src/main/resources/se/diabol/jenkins/pipeline/DeliveryPipelineView/index.jelly#L31

            As well as Active Choices

            https://github.com/jenkinsci/active-choices-plugin/blob/2daaa86bb4a2e6a882fdb9cc1b846371eba497f5/src/main/resources/org/biouno/unochoice/DynamicReferenceParameter/index.jelly#L5

            But the JQuery adjunct version used in both is different. We are a few versions behind.

            I just attached a new HPI file (see timestamp). If you have time, could you try this one, with and without the delivery pipeline plugin, please?

            Cheers
            B

            Show
            kinow Bruno P. Kinoshita added a comment - That's great news Matthias. Kudos for the investigate work And it is also interesting that the jquery plugin seems to be the issue. Jenkins plug-in developers use "adjuncts", which are a resource that imports an asset only once. So if two plug-ins need JQuery, what is important is that they are both using adjuncts. The Delivery Pipeline plug-in seems to be using adjuncts https://github.com/Diabol/delivery-pipeline-plugin/blob/master/src/main/resources/se/diabol/jenkins/pipeline/DeliveryPipelineView/index.jelly#L31 As well as Active Choices https://github.com/jenkinsci/active-choices-plugin/blob/2daaa86bb4a2e6a882fdb9cc1b846371eba497f5/src/main/resources/org/biouno/unochoice/DynamicReferenceParameter/index.jelly#L5 But the JQuery adjunct version used in both is different. We are a few versions behind. I just attached a new HPI file (see timestamp). If you have time, could you try this one, with and without the delivery pipeline plugin, please? Cheers B
            kinow Bruno P. Kinoshita made changes -
            Attachment uno-choice-20161029.hpi [ 34637 ]
            mattsbg Matthias Zangl made changes -
            Attachment jenkins2016103101.png [ 34647 ]
            Hide
            mattsbg Matthias Zangl added a comment - - edited

            Hi, thanks for the provided hpi. I tested it.

            But the new one does not work with nor without the Delivery Pipeline Plugin. On checkbox button click it fires but the OPTION_C is not updated.

            I attached the screenshot

            thanks,
            Matthias

            Show
            mattsbg Matthias Zangl added a comment - - edited Hi, thanks for the provided hpi. I tested it. But the new one does not work with nor without the Delivery Pipeline Plugin. On checkbox button click it fires but the OPTION_C is not updated. I attached the screenshot thanks, Matthias
            Hide
            kinow Bruno P. Kinoshita added a comment -

            Hi Matthias,

            I suspect the Delivery Pipeline Plugin is not really causing this issue.

            I started the plugin in debug again in Eclipse. Re-created the job using the same script from my previous commits. Installed the Delivery Pipeline plug-in. Restarted Jenkins. Configured the job to include the Delivery Plugin configuration, with some dummy values.

            Everything works fine.

            Your Jenkins looks a bit different, and I have never seen theme.js appear in any of my previous errors with JavaScript in Jenkins. Are you sure you don't have another plug-in causing this issue? You may have to do some investigate work, starting always by a blank vanilla Jenkins + active choices, and then slowly adding your other plug-in/dependency/script/etc.

            I'll have to work on other issues in this development cycle, and likely won't have time to debug this issue again, unless there is a definite way to reproduce it in my environment (or if there is a pull request ). Will start another development cycle near December anyway, so we can fix it before x-mas and cut a release.

            Show
            kinow Bruno P. Kinoshita added a comment - Hi Matthias, I suspect the Delivery Pipeline Plugin is not really causing this issue. I started the plugin in debug again in Eclipse. Re-created the job using the same script from my previous commits. Installed the Delivery Pipeline plug-in. Restarted Jenkins. Configured the job to include the Delivery Plugin configuration, with some dummy values. Everything works fine. Your Jenkins looks a bit different, and I have never seen theme.js appear in any of my previous errors with JavaScript in Jenkins. Are you sure you don't have another plug-in causing this issue? You may have to do some investigate work, starting always by a blank vanilla Jenkins + active choices, and then slowly adding your other plug-in/dependency/script/etc. I'll have to work on other issues in this development cycle, and likely won't have time to debug this issue again, unless there is a definite way to reproduce it in my environment (or if there is a pull request ). Will start another development cycle near December anyway, so we can fix it before x-mas and cut a release.
            Hide
            mattsbg Matthias Zangl added a comment -

            Hi Bruno,

            sure, I understand. On my first try to reproduce in my test environment I built it too be similiar as my production server. The theme.js may come from a theming plugin I installed.

            I'll start from scratch and see if I can track it down to the JQuery plugin again.

            I keep you informed

            best regards,
            Matthias

            Show
            mattsbg Matthias Zangl added a comment - Hi Bruno, sure, I understand. On my first try to reproduce in my test environment I built it too be similiar as my production server. The theme.js may come from a theming plugin I installed. I'll start from scratch and see if I can track it down to the JQuery plugin again. I keep you informed best regards, Matthias
            Hide
            mattsbg Matthias Zangl added a comment -

            Hi Bruno,

            ok, started from scratch. I installed the jenkins 2.19.1 using the suggest plugins during installation. After that I installed active choices plugin and built my demo project. As expected it worked. Then I only installed jQuery plugin + restarted jenkins service and the sample stopped working. Disabling the jQuery plugin and restart jenkins service it works again.

            At this point I started from scratch again. This time I didn't install any plugins during jenkins installation routine. After installation I just added active choices plugin (including the plugins it obviously depends on), restarted and my example project worked. Then I just installed jquery (and its depending plugins) , restarted and it didn't work anymore.

            The host in this sandbox environment was a windows 7 32 bit.

            Hope this helps you to reproduce it on your side.

            best regards,
            Matthias

            Show
            mattsbg Matthias Zangl added a comment - Hi Bruno, ok, started from scratch. I installed the jenkins 2.19.1 using the suggest plugins during installation. After that I installed active choices plugin and built my demo project. As expected it worked. Then I only installed jQuery plugin + restarted jenkins service and the sample stopped working. Disabling the jQuery plugin and restart jenkins service it works again. At this point I started from scratch again. This time I didn't install any plugins during jenkins installation routine. After installation I just added active choices plugin (including the plugins it obviously depends on), restarted and my example project worked. Then I just installed jquery (and its depending plugins) , restarted and it didn't work anymore. The host in this sandbox environment was a windows 7 32 bit. Hope this helps you to reproduce it on your side. best regards, Matthias
            ioannis Ioannis Moutsatsos made changes -
            Attachment image-2017-03-30-12-27-15-823.png [ 36830 ]
            ioannis Ioannis Moutsatsos made changes -
            Attachment image-2017-03-30-12-27-53-554.png [ 36831 ]
            ioannis Ioannis Moutsatsos made changes -
            Attachment config[1].xml [ 36832 ]
            Hide
            ioannis Ioannis Moutsatsos added a comment -

            Matthias Zangl thank you for your investigation. I finally can reproduce this bug and I can confirm that is related not only to the jQuery plugin, but also a particular version of the plugin. Active Choice Reactive references are working as expected with jQuery plugin 1.7.2-1 but not with the latest version 1.11.2-0.

            Hopefully Bruno P. Kinoshita will be able to focus on this particular finding to resolve the bug. Thank you both!!

             

            Bruno P. Kinoshita attached is an example to try.

            With multi-select you get this

             

            With Check Boxes you get

            Note that the checkbox values are not propagated to AC_REFPRAM_C but interestingly, they are propagated to the build!

            config[1].xml

            Show
            ioannis Ioannis Moutsatsos added a comment - Matthias Zangl thank you for your investigation. I finally can reproduce this bug and I can confirm that is related not only to the jQuery plugin, but also a particular version of the plugin. Active Choice Reactive references are working as expected with jQuery plugin 1.7.2-1 but not with the latest version 1.11.2-0. Hopefully Bruno P. Kinoshita will be able to focus on this particular finding to resolve the bug. Thank you both!!   Bruno P. Kinoshita attached is an example to try. With multi-select you get this   With Check Boxes you get Note that the checkbox values are not propagated to AC_REFPRAM_C but interestingly, they are propagated to the build! config[1].xml
            ioannis Ioannis Moutsatsos made changes -
            Priority Minor [ 4 ] Major [ 3 ]
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Bruno P. Kinoshita
            Path:
            pom.xml
            src/test/js/lib/jquery-1.11.2.min.js
            src/test/js/lib/jquery-1.7.2.min.js
            src/test/js/lib/qunit-1.14.0.css
            src/test/js/lib/qunit-1.14.0.js
            src/test/js/lib/tests.html
            http://jenkins-ci.org/commit/active-choices-plugin/8a97011b547cde9520929a1370e38c0b3a4972ef
            Log:
            JENKINS-36158: update JQuery to 1.11.2 to match stapler-jquery-adjunct's version

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Bruno P. Kinoshita Path: pom.xml src/test/js/lib/jquery-1.11.2.min.js src/test/js/lib/jquery-1.7.2.min.js src/test/js/lib/qunit-1.14.0.css src/test/js/lib/qunit-1.14.0.js src/test/js/lib/tests.html http://jenkins-ci.org/commit/active-choices-plugin/8a97011b547cde9520929a1370e38c0b3a4972ef Log: JENKINS-36158 : update JQuery to 1.11.2 to match stapler-jquery-adjunct's version
            kinow Bruno P. Kinoshita made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Bruno P. Kinoshita
            Path:
            src/main/resources/org/biouno/unochoice/stapler/unochoice/unochoice.js
            http://jenkins-ci.org/commit/active-choices-plugin/a5f051216707b73f214748bf1717ec9e98acea55
            Log:
            [FIXED JENKINS-36158] use .prop instead of .attr, and treat it as bool

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Bruno P. Kinoshita Path: src/main/resources/org/biouno/unochoice/stapler/unochoice/unochoice.js http://jenkins-ci.org/commit/active-choices-plugin/a5f051216707b73f214748bf1717ec9e98acea55 Log: [FIXED JENKINS-36158] use .prop instead of .attr, and treat it as bool
            scm_issue_link SCM/JIRA link daemon made changes -
            Resolution Fixed [ 1 ]
            Status In Progress [ 3 ] Resolved [ 5 ]
            Hide
            kinow Bruno P. Kinoshita added a comment -

            Previous change was to upgrade JQuery. Then started debugging this issue after a message on the biouno-developers mailing list.

            Debugging, could find that a e.attr('checked') was returning undefined, though it was supposed to return something... searching I found some people with similar problem. Looks like e.attr() was replaced by e.prop(), and now it returns boolean.

            http://forum.jquery.com/topic/please-explain-attr-vs-prop-change-in-1-6
            https://stackoverflow.com/questions/5270689/attrchecked-checked-does-not-work/15385392

            Fixed, included in the next release. Thanks!
            Bruno

            Show
            kinow Bruno P. Kinoshita added a comment - Previous change was to upgrade JQuery. Then started debugging this issue after a message on the biouno-developers mailing list. Debugging, could find that a e.attr('checked') was returning undefined, though it was supposed to return something... searching I found some people with similar problem. Looks like e.attr() was replaced by e.prop(), and now it returns boolean. http://forum.jquery.com/topic/please-explain-attr-vs-prop-change-in-1-6 https://stackoverflow.com/questions/5270689/attrchecked-checked-does-not-work/15385392 Fixed, included in the next release. Thanks! Bruno

              People

              Assignee:
              kinow Bruno P. Kinoshita
              Reporter:
              mattsbg Matthias Zangl
              Votes:
              2 Vote for this issue
              Watchers:
              11 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: