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

On a configure screen that has multiple groups of radio buttons, clicking the apply button clears all but the last radio group selection

    XMLWordPrintable

Details

    Description

      buildFormTree changes the DOM while parsing the radio button sections, mutating the name field of each element. Since the DOM model is that there can only be at most one selected element for each distinct name, the last radio button selected for each base name will be the only one selected.

      The fix is not to mutate the DOM while building the JSON form data.

      Attachments

        Issue Links

          Activity

            Code changed in jenkins
            User: Stephen Connolly
            Path:
            war/src/main/webapp/scripts/hudson-behavior.js
            http://jenkins-ci.org/commit/jenkins/88d84f6e9b2f05366bc8e6f4bc62ac61e7211926
            Log:
            [FIXED JENKINS-22570] On a configure screen that has multiple groups of radio buttons, clicking the apply button clears all but the last radio group selection

            • Changed from mutating the e.name value to maintaining an index and using that index to get the required substring
            • Risk of unintended consequences is low. The Submit flow moves off the page before the consequences of the effect
              could be seen... though a careful attention to the page submit can identify the change... and the page is now
              left as before clicking f:apply instead of mutated.
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Stephen Connolly Path: war/src/main/webapp/scripts/hudson-behavior.js http://jenkins-ci.org/commit/jenkins/88d84f6e9b2f05366bc8e6f4bc62ac61e7211926 Log: [FIXED JENKINS-22570] On a configure screen that has multiple groups of radio buttons, clicking the apply button clears all but the last radio group selection Changed from mutating the e.name value to maintaining an index and using that index to get the required substring Risk of unintended consequences is low. The Submit flow moves off the page before the consequences of the effect could be seen... though a careful attention to the page submit can identify the change... and the page is now left as before clicking f:apply instead of mutated.
            dogfood dogfood added a comment -

            Integrated in jenkins_main_trunk #3289
            [FIXED JENKINS-22570] On a configure screen that has multiple groups of radio buttons, clicking the apply button clears all but the last radio group selection (Revision 88d84f6e9b2f05366bc8e6f4bc62ac61e7211926)

            Result = UNSTABLE
            Stephen Connolly : 88d84f6e9b2f05366bc8e6f4bc62ac61e7211926
            Files :

            • war/src/main/webapp/scripts/hudson-behavior.js
            dogfood dogfood added a comment - Integrated in jenkins_main_trunk #3289 [FIXED JENKINS-22570] On a configure screen that has multiple groups of radio buttons, clicking the apply button clears all but the last radio group selection (Revision 88d84f6e9b2f05366bc8e6f4bc62ac61e7211926) Result = UNSTABLE Stephen Connolly : 88d84f6e9b2f05366bc8e6f4bc62ac61e7211926 Files : war/src/main/webapp/scripts/hudson-behavior.js

            Code changed in jenkins
            User: Stephen Connolly
            Path:
            war/src/main/webapp/scripts/hudson-behavior.js
            http://jenkins-ci.org/commit/jenkins/6f6dce4bef25846d6efcbf75e1a3aa50bbe77d77
            Log:
            [FIXED JENKINS-22570] On a configure screen that has multiple groups of radio buttons, clicking the apply button clears all but the last radio group selection

            • Always run git status before and after you commit, just in case there are changes you made since your last call to git add
            • At least the integration test cases caught this one though
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Stephen Connolly Path: war/src/main/webapp/scripts/hudson-behavior.js http://jenkins-ci.org/commit/jenkins/6f6dce4bef25846d6efcbf75e1a3aa50bbe77d77 Log: [FIXED JENKINS-22570] On a configure screen that has multiple groups of radio buttons, clicking the apply button clears all but the last radio group selection Always run git status before and after you commit, just in case there are changes you made since your last call to git add At least the integration test cases caught this one though
            dogfood dogfood added a comment -

            Integrated in jenkins_main_trunk #3290
            [FIXED JENKINS-22570] On a configure screen that has multiple groups of radio buttons, clicking the apply button clears all but the last radio group selection (Revision 6f6dce4bef25846d6efcbf75e1a3aa50bbe77d77)

            Result = SUCCESS
            Stephen Connolly : 6f6dce4bef25846d6efcbf75e1a3aa50bbe77d77
            Files :

            • war/src/main/webapp/scripts/hudson-behavior.js
            dogfood dogfood added a comment - Integrated in jenkins_main_trunk #3290 [FIXED JENKINS-22570] On a configure screen that has multiple groups of radio buttons, clicking the apply button clears all but the last radio group selection (Revision 6f6dce4bef25846d6efcbf75e1a3aa50bbe77d77) Result = SUCCESS Stephen Connolly : 6f6dce4bef25846d6efcbf75e1a3aa50bbe77d77 Files : war/src/main/webapp/scripts/hudson-behavior.js

            Code changed in jenkins
            User: Stephen Connolly
            Path:
            war/src/main/webapp/scripts/hudson-behavior.js
            http://jenkins-ci.org/commit/jenkins/1da70d3da067e3d1d13222166180fae9dfffd4da
            Log:
            [FIXED JENKINS-22570] On a configure screen that has multiple groups of radio buttons, clicking the apply button clears all but the last radio group selection

            • Changed from mutating the e.name value to maintaining an index and using that index to get the required substring
            • Risk of unintended consequences is low. The Submit flow moves off the page before the consequences of the effect
              could be seen... though a careful attention to the page submit can identify the change... and the page is now
              left as before clicking f:apply instead of mutated.

            (cherry picked from commit 88d84f6e9b2f05366bc8e6f4bc62ac61e7211926)

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Stephen Connolly Path: war/src/main/webapp/scripts/hudson-behavior.js http://jenkins-ci.org/commit/jenkins/1da70d3da067e3d1d13222166180fae9dfffd4da Log: [FIXED JENKINS-22570] On a configure screen that has multiple groups of radio buttons, clicking the apply button clears all but the last radio group selection Changed from mutating the e.name value to maintaining an index and using that index to get the required substring Risk of unintended consequences is low. The Submit flow moves off the page before the consequences of the effect could be seen... though a careful attention to the page submit can identify the change... and the page is now left as before clicking f:apply instead of mutated. (cherry picked from commit 88d84f6e9b2f05366bc8e6f4bc62ac61e7211926)

            Code changed in jenkins
            User: Stephen Connolly
            Path:
            war/src/main/webapp/scripts/hudson-behavior.js
            http://jenkins-ci.org/commit/jenkins/1335246fdf39c8d5f92974c508a26bbe94be32d4
            Log:
            [FIXED JENKINS-22570] On a configure screen that has multiple groups of radio buttons, clicking the apply button clears all but the last radio group selection

            • Always run git status before and after you commit, just in case there are changes you made since your last call to git add
            • At least the integration test cases caught this one though

            (cherry picked from commit 6f6dce4bef25846d6efcbf75e1a3aa50bbe77d77)

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Stephen Connolly Path: war/src/main/webapp/scripts/hudson-behavior.js http://jenkins-ci.org/commit/jenkins/1335246fdf39c8d5f92974c508a26bbe94be32d4 Log: [FIXED JENKINS-22570] On a configure screen that has multiple groups of radio buttons, clicking the apply button clears all but the last radio group selection Always run git status before and after you commit, just in case there are changes you made since your last call to git add At least the integration test cases caught this one though (cherry picked from commit 6f6dce4bef25846d6efcbf75e1a3aa50bbe77d77)

            People

              Unassigned Unassigned
              stephenconnolly Stephen Connolly
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: