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

New Item page shows "field cannot be empty" error when attempting to create a duplicate item

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • core
    • None

      What incorrect behavior happened?

      When creating a new item, if a duplicate exists, the "duplicate name" text is immediately overriden by "invalid name" error text. This is especially problematic if a user is creating a new item further in the list. In that scenario, the user effectively receives the wrong warning message.

      I've attached some screenshots of the state of the Jenkins under test.

      What was the expected outcome?

      The expected behavior is that the "duplicate name" error text should persist so that the user understands why their input is incorrect.

      Step by step to reproduce it

      1. Create freestyle Job with name "asdf"
      2. Create second freestyle job with "asdf"
      3. Note that the error text for "duplicate name" is appears when mouseclickdown but overridden when the mouseclickup

          [JENKINS-37523] New Item page shows "field cannot be empty" error when attempting to create a duplicate item

          Ryan Campbell created issue -
          Ryan Campbell made changes -
          Environment Original: * O.S.: _OSX_
          * CJE version: _2.7.2.0-alpha-3_
          * CJOC version: _N/A_
          * Web browser: _Chrome_
          * JDK version: _JDK8_
          Ryan Campbell made changes -
          Attachment New: Screen Shot 2016-08-17 at 9.48.44 AM.png [ 33650 ]
          Ryan Campbell made changes -
          Assignee New: Keith Zantow [ kzantow ]
          Keith Zantow made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]
          Keith Zantow made changes -
          Remote Link New: This issue links to "PR 2513 (Web Link)" [ 14741 ]
          Keith Zantow made changes -
          Status Original: In Progress [ 3 ] New: In Review [ 10005 ]

          Code changed in jenkins
          User: Keith Zantow
          Path:
          war/src/main/js/add-item.js
          http://jenkins-ci.org/commit/jenkins/740fef2978d491ac6e3ab752bc70871fdd56546f
          Log:
          JENKINS-37523 - wrong message for duplicate item name during create (#2513)

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Keith Zantow Path: war/src/main/js/add-item.js http://jenkins-ci.org/commit/jenkins/740fef2978d491ac6e3ab752bc70871fdd56546f Log: JENKINS-37523 - wrong message for duplicate item name during create (#2513)
          Keith Zantow made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: In Review [ 10005 ] New: Resolved [ 5 ]

          Code changed in jenkins
          User: kzantow
          Path:
          src/main/java/org/jenkinsci/test/acceptance/po/JobsMixIn.java
          src/test/java/core/CreateItemTest.java
          http://jenkins-ci.org/commit/acceptance-test-harness/fc1c99575bd215a0a1fcbf7f06ebcfa00fb30ec9
          Log:
          JENKINS-37523 - wrong message displayed for duplicate item name

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: kzantow Path: src/main/java/org/jenkinsci/test/acceptance/po/JobsMixIn.java src/test/java/core/CreateItemTest.java http://jenkins-ci.org/commit/acceptance-test-harness/fc1c99575bd215a0a1fcbf7f06ebcfa00fb30ec9 Log: JENKINS-37523 - wrong message displayed for duplicate item name

            kzantow Keith Zantow
            recampbell Ryan Campbell
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: