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

Form validation with dependency to another field not working as expected

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: core
    • Labels:
      None
    • Similar Issues:

      Description

      When you have two fields whose validations are inter-related:

      <f:entry field="aaa">
        <f:textbox />
      </f:entry>
      <f:entry field="bbb">
        <f:select />
      </f:entry>
      

      Then the check method on "aaa" that uses two values:

      FormValidation doCheckAaa(@QueryParameter String value, @QueryParameter String bbb) { ... }
      

      The check method should trigger when the select field changes its value, but Stephen Connolly found that it doesn't.

        Attachments

          Issue Links

            Activity

            Show
            stephenconnolly Stephen Connolly added a comment - See https://github.com/jenkinsci/subversion-plugin/commit/1018396aaf1bf272a0bd50592413ca6387868ffa but needs https://github.com/jenkinsci/credentials-plugin/commit/404ee093a655d0cb5717c61736b5af844472bf07 to compile
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Kohsuke Kawaguchi
            Path:
            changelog.html
            core/src/main/java/hudson/Functions.java
            core/src/main/java/hudson/model/Descriptor.java
            core/src/main/java/hudson/util/FormValidation.java
            core/src/main/resources/lib/form/checkbox.jelly
            core/src/main/resources/lib/form/editableComboBox.jelly
            core/src/main/resources/lib/form/prepareDatabinding.jelly
            core/src/main/resources/lib/form/readOnlyTextbox.jelly
            core/src/main/resources/lib/form/textarea.jelly
            test/src/main/java/org/jvnet/hudson/test/JenkinsRule.java
            test/src/test/groovy/jenkins/bugs/Jenkins19124Test.groovy
            test/src/test/resources/jenkins/bugs/Jenkins19124Test/Foo/config.groovy
            war/src/main/webapp/scripts/hudson-behavior.js
            http://jenkins-ci.org/commit/jenkins/7232798611b66f4a03ad8670c07cb58220f4d866
            Log:
            [FIXED JENKINS-19124]

            Added another attribute 'checkDependsOn' on <input> elements (akin to
            'fillDependsOn', etc) to list up the other dependency controls, and
            insert appropriate onchange events.

            'checkUrl' is now just the stem portion of the URL to invoke, and
            the client script builds up the query parameters.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Kohsuke Kawaguchi Path: changelog.html core/src/main/java/hudson/Functions.java core/src/main/java/hudson/model/Descriptor.java core/src/main/java/hudson/util/FormValidation.java core/src/main/resources/lib/form/checkbox.jelly core/src/main/resources/lib/form/editableComboBox.jelly core/src/main/resources/lib/form/prepareDatabinding.jelly core/src/main/resources/lib/form/readOnlyTextbox.jelly core/src/main/resources/lib/form/textarea.jelly test/src/main/java/org/jvnet/hudson/test/JenkinsRule.java test/src/test/groovy/jenkins/bugs/Jenkins19124Test.groovy test/src/test/resources/jenkins/bugs/Jenkins19124Test/Foo/config.groovy war/src/main/webapp/scripts/hudson-behavior.js http://jenkins-ci.org/commit/jenkins/7232798611b66f4a03ad8670c07cb58220f4d866 Log: [FIXED JENKINS-19124] Added another attribute 'checkDependsOn' on <input> elements (akin to 'fillDependsOn', etc) to list up the other dependency controls, and insert appropriate onchange events. 'checkUrl' is now just the stem portion of the URL to invoke, and the client script builds up the query parameters.
            Hide
            dogfood dogfood added a comment -

            Integrated in jenkins_main_trunk #2793
            [FIXED JENKINS-19124] (Revision 7232798611b66f4a03ad8670c07cb58220f4d866)

            Result = SUCCESS
            kohsuke : 7232798611b66f4a03ad8670c07cb58220f4d866
            Files :

            • changelog.html
            • core/src/main/resources/lib/form/checkbox.jelly
            • test/src/test/resources/jenkins/bugs/Jenkins19124Test/Foo/config.groovy
            • core/src/main/java/hudson/util/FormValidation.java
            • core/src/main/resources/lib/form/editableComboBox.jelly
            • core/src/main/java/hudson/Functions.java
            • war/src/main/webapp/scripts/hudson-behavior.js
            • test/src/main/java/org/jvnet/hudson/test/JenkinsRule.java
            • core/src/main/java/hudson/model/Descriptor.java
            • core/src/main/resources/lib/form/textarea.jelly
            • test/src/test/groovy/jenkins/bugs/Jenkins19124Test.groovy
            • core/src/main/resources/lib/form/readOnlyTextbox.jelly
            • core/src/main/resources/lib/form/prepareDatabinding.jelly
            Show
            dogfood dogfood added a comment - Integrated in jenkins_main_trunk #2793 [FIXED JENKINS-19124] (Revision 7232798611b66f4a03ad8670c07cb58220f4d866) Result = SUCCESS kohsuke : 7232798611b66f4a03ad8670c07cb58220f4d866 Files : changelog.html core/src/main/resources/lib/form/checkbox.jelly test/src/test/resources/jenkins/bugs/Jenkins19124Test/Foo/config.groovy core/src/main/java/hudson/util/FormValidation.java core/src/main/resources/lib/form/editableComboBox.jelly core/src/main/java/hudson/Functions.java war/src/main/webapp/scripts/hudson-behavior.js test/src/main/java/org/jvnet/hudson/test/JenkinsRule.java core/src/main/java/hudson/model/Descriptor.java core/src/main/resources/lib/form/textarea.jelly test/src/test/groovy/jenkins/bugs/Jenkins19124Test.groovy core/src/main/resources/lib/form/readOnlyTextbox.jelly core/src/main/resources/lib/form/prepareDatabinding.jelly
            Hide
            gcummings Geoff Cummings added a comment -

            This change has broken the Job Configuration page

            Show
            gcummings Geoff Cummings added a comment - This change has broken the Job Configuration page
            Hide
            jglick Jesse Glick added a comment -

            @gcummings: please file a new bug with details, mark with keyword regression, and add a commit comment to https://github.com/jenkinsci/jenkins/commit/7232798611b66f4a03ad8670c07cb58220f4d866 mentioning it.

            Show
            jglick Jesse Glick added a comment - @gcummings: please file a new bug with details, mark with keyword regression , and add a commit comment to https://github.com/jenkinsci/jenkins/commit/7232798611b66f4a03ad8670c07cb58220f4d866 mentioning it.
            Hide
            gcummings Geoff Cummings added a comment -

            JENKINS-19248 had already been created for this issue, so I had linked to it.
            I have updated its title to include 'regression'
            I have also linked to it from the git commit page.

            Show
            gcummings Geoff Cummings added a comment - JENKINS-19248 had already been created for this issue, so I had linked to it. I have updated its title to include 'regression' I have also linked to it from the git commit page.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Kohsuke Kawaguchi
            Path:
            test/src/main/java/org/jvnet/hudson/test/JenkinsRule.java
            http://jenkins-ci.org/commit/jenkins-test-harness/3cb5584599f4801612fd1939fd8f705d55757ce9
            Log:
            [FIXED JENKINS-19124]

            Added another attribute 'checkDependsOn' on <input> elements (akin to
            'fillDependsOn', etc) to list up the other dependency controls, and
            insert appropriate onchange events.

            'checkUrl' is now just the stem portion of the URL to invoke, and
            the client script builds up the query parameters.

            Originally-Committed-As: 7232798611b66f4a03ad8670c07cb58220f4d866

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Kohsuke Kawaguchi Path: test/src/main/java/org/jvnet/hudson/test/JenkinsRule.java http://jenkins-ci.org/commit/jenkins-test-harness/3cb5584599f4801612fd1939fd8f705d55757ce9 Log: [FIXED JENKINS-19124] Added another attribute 'checkDependsOn' on <input> elements (akin to 'fillDependsOn', etc) to list up the other dependency controls, and insert appropriate onchange events. 'checkUrl' is now just the stem portion of the URL to invoke, and the client script builds up the query parameters. Originally-Committed-As: 7232798611b66f4a03ad8670c07cb58220f4d866

              People

              • Assignee:
                Unassigned
                Reporter:
                kohsuke Kohsuke Kawaguchi
              • Votes:
                0 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: