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

doCheckProjects can get confused with Cloudbees Template plugin


    • Similar Issues:


      BuildTriggerConfig.DescriptorImpl.doCheckProjects receives Item object, which is expected to be the project being configured.

      public FormValidation doCheckProjects(@AncestorInPath Item project, @QueryParameter String value ) {

      Cloudbees Template plugin uses JobPropertyImpl.getJobOverrides, which overrides the stapler's object path:

      • Jenkins
      • The project being configured
      • ...
      • JobTemplate <- This is inserted by JobPropertyImpl.getJobOverrides.
      • ...

      This results doCheckProjects receive a JobTemplate object as project, and fail to check project names as the JobTemplate object is the templated project.
      Failures happen when the parent of the configuring project and the parent of the templated project differ (e.g. they are in different Cloudbee Folder).

      As JobTemplate is a subclass of AbstractItem, the type of project should be changed to Job or AbstractProject.


          Issue Links


            ikedam ikedam created issue -
            ikedam ikedam made changes -
            Field Original Value New Value
            Link This issue is related to JENKINS-22828 [ JENKINS-22828 ]
            scm_issue_link SCM/JIRA link daemon made changes -
            Status Open [ 1 ] Resolved [ 5 ]
            Resolution Fixed [ 1 ]
            ikedam ikedam made changes -
            Status Resolved [ 5 ] Closed [ 6 ]
            rtyler R. Tyler Croy made changes -
            Workflow JNJira [ 155001 ] JNJira + In-Review [ 207672 ]


              • Assignee:
                ikedam ikedam
                ikedam ikedam
              • Votes:
                0 Vote for this issue
                3 Start watching this issue


                • Created: