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

          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!

          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.

          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/e32232258478a0f3de132b975418e90523073985
          Log:
          Merge pull request #2192 from jglick/checkJobName-JENKINS-20509

          JENKINS-20509 Move doCheckJobName to View

          Compare: https://github.com/jenkinsci/jenkins/compare/52bb33242532...e32232258478

          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/e32232258478a0f3de132b975418e90523073985 Log: Merge pull request #2192 from jglick/checkJobName- JENKINS-20509 JENKINS-20509 Move doCheckJobName to View Compare: https://github.com/jenkinsci/jenkins/compare/52bb33242532...e32232258478

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

              Created:
              Updated:
              Resolved: