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

create-item button no longer disabled when duplicate name present

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • core
    • Jenkins 2.453 and later (not visible in 2.452 and earlier)
    • 2.454

      ATH core.CreateItemTest.duplicate_item_name_displays_error has detected a regression in Jenkins core as the "OK" button is no longer disabled when the name is a duplicate.

      reproduced manually

      Steps to reproduce

      build and start Jenkins in a clean Jenkins home
      skip all plugin installation
      create a new Freestyle job called "test"
      save the job
      go back to the root and create a new item
      enter "test" as the name, and select Freestyle job

      Expected behaviour

      the form validation shows the name is not good
      the OK button is disabled

      Actual Behaviour

      the form validation shows the name is not good
      the OK button is *not* disabled

        1. after.png
          after.png
          85 kB
        2. before.png
          before.png
          89 kB
        3. image-2024-04-12-17-17-40-901.png
          image-2024-04-12-17-17-40-901.png
          64 kB

          [JENKINS-73007] create-item button no longer disabled when duplicate name present

          James Nord added a comment -

          864b2753f85087ca1a2d7144fb426a210181f5f8 (https://github.com/jenkinsci/jenkins/pull/9111) is broken
          b9fac75ac88415a00c128f8e2edb884d82ecdaac is broken

          ....

          c8c1322b14773efa1855dae18e8605dc7a45687b is broken

          ...

          e4079f71c119cc1f693cec3bd021594be0b014f9 is ???

          James Nord added a comment - 864b2753f85087ca1a2d7144fb426a210181f5f8 ( https://github.com/jenkinsci/jenkins/pull/9111 ) is broken b9fac75ac88415a00c128f8e2edb884d82ecdaac is broken .... c8c1322b14773efa1855dae18e8605dc7a45687b is broken ... e4079f71c119cc1f693cec3bd021594be0b014f9 is ???

          janfaracik do you want to take a look?

          Alexander Brandes added a comment - janfaracik do you want to take a look?

          Daniel Beck added a comment -

          as the "OK" button is no longer disabled when the name is a duplicate

          I don't think this issue correctly captures the cause for the test failure. Looking at the test, the OK button is supposed to be disabled at https://github.com/jenkinsci/acceptance-test-harness/blob/fed75e3aac657a987b5647399da38589581676d0/src/test/java/core/CreateItemTest.java#L38 and enabled at https://github.com/jenkinsci/acceptance-test-harness/blob/fed75e3aac657a987b5647399da38589581676d0/src/test/java/core/CreateItemTest.java#L46-L47, so it is supposed to be disabled only when no job type is selected.

          Daniel Beck added a comment - as the "OK" button is no longer disabled when the name is a duplicate I don't think this issue correctly captures the cause for the test failure. Looking at the test, the OK button is supposed to be disabled at https://github.com/jenkinsci/acceptance-test-harness/blob/fed75e3aac657a987b5647399da38589581676d0/src/test/java/core/CreateItemTest.java#L38 and enabled at https://github.com/jenkinsci/acceptance-test-harness/blob/fed75e3aac657a987b5647399da38589581676d0/src/test/java/core/CreateItemTest.java#L46-L47 , so it is supposed to be disabled only when no job type is selected.

          James Nord added a comment - - edited

          Good catch Daniel, that may well explain why my bisecting did not produce the results I was expecting 🤦

          New issue or re-open?

          James Nord added a comment - - edited Good catch Daniel, that may well explain why my bisecting did not produce the results I was expecting 🤦 New issue or re-open?

          Daniel Beck added a comment -

          I filed JENKINS-73034 for the incomplete "fix". In a way this is an improvement after all

          Daniel Beck added a comment - I filed JENKINS-73034 for the incomplete "fix". In a way this is an improvement after all

            janfaracik Jan Faracik
            teilo James Nord
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: