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

Form validation is never displayed for fields initially hidden under Advanced section (regression in 2.355)

    • 2.427, 2.426.1

      https://github.com/jenkinsci/jenkins/pull/6460 seems to introduce a regression for form validation for fields that are initially hidden under advanced section.

      I've created a dummy plugin to make easier to see.

      Having the plugin installed, going to Global configuration page, scrolling to the corresponding section and expanding the advanced section I'm observing this:

      Form validation message is rendered for the field that's not under the advanced section, though no validation for the field under Advanced section.
      doCheckAnotherField is invoked on page load and the corresponding response is received, but not rendered.

          [JENKINS-71252] Form validation is never displayed for fields initially hidden under Advanced section (regression in 2.355)

          Daniel Beck added a comment -

          Core-only reproduction steps:

          Configure a Freestyle job, Add an "Execute Shell" build step, click "Advanced", click "Add Environment Filter", select "Only Keep Specified…", uncheck "Retain characteristic environment variables". That'll show a form validation warning for the checkbox.

          Save and reload the form, click "Advanced." No form validation for the checkbox now until you change its state.

          Daniel Beck added a comment - Core-only reproduction steps: Configure a Freestyle job, Add an "Execute Shell" build step, click "Advanced", click "Add Environment Filter", select "Only Keep Specified…", uncheck "Retain characteristic environment variables". That'll show a form validation warning for the checkbox. Save and reload the form, click "Advanced." No form validation for the checkbox now until you change its state.

          Daniel Beck added a comment -

          Issue is present on 848883db8d748316175930aa5fef3749ec5cdc46, but not 3d2692776360d36819fda9e8deb9723521698e76.

          Daniel Beck added a comment - Issue is present on 848883db8d748316175930aa5fef3749ec5cdc46, but not 3d2692776360d36819fda9e8deb9723521698e76.

            danielbeck Daniel Beck
            yafenkin Yaroslav Afenkin
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: