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

booleanRadio uses non-unique ID (regression in 2.335)

    • 2.391

      The implementation of our boolean radio button (see https://github.com/jenkinsci/jenkins/blob/master/core/src/main/resources/lib/form/booleanRadio.jelly) does use a generated ID. When you have a repeatable describable (e.g. quality gates in the warnings plugin, or code coverage plugin) then this ID will be duplicated for all instances, i.e. the button will be toggled automatically for all instances rather than for the selected one only. We need to provide a way to make this ID unique.

          [JENKINS-70139] booleanRadio uses non-unique ID (regression in 2.335)

          Susanta added a comment -

          This issue is present in Jenkins 

          Jenkins 2.392

          This is a blocker for me as there are many jobs that have radio button in them and selecting one radio button is unselecting the other radio button of a different section

          I have attached the video for the same, this issue was not there before,

           

          Kindly please resolve this asap

           

           

          Susanta added a comment - This issue is present in Jenkins  Jenkins 2.392 This is a blocker for me as there are many jobs that have radio button in them and selecting one radio button is unselecting the other radio button of a different section I have attached the video for the same, this issue was not there before,   Kindly please resolve this asap    

          Ulli Hafner added a comment -

          sushanto Can you please add the concrete steps to reproduce so that we can add a UI test case that reflects your use case.

          Ulli Hafner added a comment - sushanto Can you please add the concrete steps to reproduce so that we can add a UI test case that reflects your use case.

          Susanta added a comment -

          In any freestyle job, just add create/edit text file section (plugin to be installed) - plugin url - https://plugins.jenkins.io/text-file-operations/

          add min two section, and try to select the overwrite file option in both the section

          drulli  FYI

          Susanta added a comment - In any freestyle job, just add create/edit text file section (plugin to be installed) - plugin url - https://plugins.jenkins.io/text-file-operations/ add min two section, and try to select the overwrite file option in both the section drulli   FYI

          Ulli Hafner added a comment - - edited

          sushanto the plugin you are referring to does not use the booleanRadio, it uses a radio button without an ID, maybe this is the problem. I think this plugin needs to be updated:

          https://github.com/jenkinsci/text-file-operations-plugin/blob/master/src/main/resources/com/etas/jenkins/plugins/CreateTextFile/CreateFileBuilder/config.jelly#L14

          Can you please file a new issue in Jira and link JENKINS-70139 as cause?

          Ulli Hafner added a comment - - edited sushanto the plugin you are referring to does not use the booleanRadio , it uses a radio button without an ID, maybe this is the problem. I think this plugin needs to be updated: https://github.com/jenkinsci/text-file-operations-plugin/blob/master/src/main/resources/com/etas/jenkins/plugins/CreateTextFile/CreateFileBuilder/config.jelly#L14 Can you please file a new issue in Jira and link JENKINS-70139 as cause?

          Ulli Hafner added a comment -

          tbeukhof Can you confirm this as well for your plugin configurations?

          Ulli Hafner added a comment - tbeukhof Can you confirm this as well for your plugin configurations?

          Tom added a comment -

          I am not totally sure, but I think these are the corresponding pieces of code in other plugins where I was running into issues with the latest Jenkins with the radio buttons:

          Credentials Binding Multi Username Password selection

          https://github.com/jenkinsci/credentials-binding-plugin/blob/master/src/main/resources/org/jenkinsci/plugins/credentialsbinding/impl/BindingStep/config.jelly#L34

          Gradle plugin step Gradle executable selection

          https://github.com/jenkinsci/gradle-plugin/blob/master/src/main/resources/hudson/plugins/gradle/Gradle/config.jelly#L5

          Tom added a comment - I am not totally sure, but I think these are the corresponding pieces of code in other plugins where I was running into issues with the latest Jenkins with the radio buttons: Credentials Binding Multi Username Password selection https://github.com/jenkinsci/credentials-binding-plugin/blob/master/src/main/resources/org/jenkinsci/plugins/credentialsbinding/impl/BindingStep/config.jelly#L34 Gradle plugin step Gradle executable selection https://github.com/jenkinsci/gradle-plugin/blob/master/src/main/resources/hudson/plugins/gradle/Gradle/config.jelly#L5

          Ulli Hafner added a comment - - edited

          Ok, the gradle plugin uses a radioBlock, this one also does not use an ID. It seems that the fix in https://github.com/jenkinsci/jenkins/pull/7631 needs to be improved.

          Can you please file a new issue about that problem, as the new problem is about all other radio buttons?

          Ulli Hafner added a comment - - edited Ok, the gradle plugin uses a radioBlock , this one also does not use an ID. It seems that the fix in https://github.com/jenkinsci/jenkins/pull/7631 needs to be improved. Can you please file a new issue about that problem, as the new problem is about all other radio buttons?

          Tom added a comment -

          Thank you for the guidance, Ulli. I created JENKINS-70739.

          Tom added a comment - Thank you for the guidance, Ulli. I created JENKINS-70739 .

          Mark Waite added a comment -

          I confirmed that the fix from Jesse Glick resolves both the credentials binding issue and the text file operations issue (as noted by sushanto)

          Mark Waite added a comment - I confirmed that the fix from Jesse Glick resolves both the credentials binding issue and the text file operations issue (as noted by sushanto )

          Ulli Hafner added a comment -

          The fix also resolves the issue in the warnings plugin!

          Ulli Hafner added a comment - The fix also resolves the issue in the warnings plugin!

            benebsiny Benny Cheng
            drulli Ulli Hafner
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: