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

View/newJob.jelly assumes it is only ever invoked from Jenkins

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

      https://github.com/jenkinsci/jenkins/blob/master/core/src/main/resources/hudson/model/View/newJob.jelly#L36 includes an implicit assumption that Views are not embedded within folders or other ItemGroups.

      Thus if you have Item.CREATE in a folder but not at the root of Jenkins you will see an ERROR message when following the newJob link and the "OK" button will remain disabled (as form validation is used to lock the button)

          [JENKINS-20509] View/newJob.jelly assumes it is only ever invoked from Jenkins

          Stephen Connolly created issue -
          Jesse Glick made changes -
          Labels New: folders

          Jesse Glick added a comment -

          I guess the same error will be displayed if there is already a job of that name in root (but not in the current folder)? (cf. Jenkins.checkJobName)

          Jesse Glick added a comment - I guess the same error will be displayed if there is already a job of that name in root (but not in the current folder)? (cf. Jenkins.checkJobName )

          Yep!

          Stephen Connolly added a comment - Yep!
          Jesse Glick made changes -
          Assignee New: Jesse Glick [ jglick ]
          Jesse Glick made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]
          Jesse Glick made changes -
          Link New: This issue depends on JENKINS-33755 [ JENKINS-33755 ]
          Jesse Glick made changes -
          Remote Link New: This issue links to "PR 2192 (Web Link)" [ 14136 ]

          Code changed in jenkins
          User: Jesse Glick
          Path:
          core/src/main/java/hudson/model/View.java
          core/src/main/java/jenkins/model/Jenkins.java
          test/src/test/java/hudson/model/ViewTest.java
          http://jenkins-ci.org/commit/jenkins/0aa2858b2e6745dcad88c3850231de7114e966a1
          Log:
          [FIXED JENKINS-20509] Move doCheckJobName to View so that it can be used also from folders.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: core/src/main/java/hudson/model/View.java core/src/main/java/jenkins/model/Jenkins.java test/src/test/java/hudson/model/ViewTest.java http://jenkins-ci.org/commit/jenkins/0aa2858b2e6745dcad88c3850231de7114e966a1 Log: [FIXED JENKINS-20509] Move doCheckJobName to View so that it can be used also from folders.
          SCM/JIRA link daemon made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: In Progress [ 3 ] New: Resolved [ 5 ]

            jglick Jesse Glick
            stephenconnolly Stephen Connolly
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: