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

Form validation with dependency to another field not working as expected

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved (View Workflow)
    • Major
    • Resolution: Fixed
    • core
    • None

    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 stephenc found that it doesn't.

      Attachments

        Issue Links

          Activity

            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

            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.

            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.
            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
            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

            This change has broken the Job Configuration page

            gcummings Geoff Cummings added a comment - This change has broken the Job Configuration page
            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.

            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.

            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.

            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.

            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

            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

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

              Dates

                Created:
                Updated:
                Resolved: