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

Job created inside a view inside a folder does not give the option to add the job to the view

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • Jenkins 2.121.3
      Cloudbees Folders Plugin 6.5.1

      Typically when creating a new job inside a view, the URL for the "New Job" button will be:
      JENKINS_HOME/view/<view_name>/newJob

      Inside a folder the URL becomes:
      JENKINS_HOME/job/<folder_name>/newJob

      The expectation would be that a view inside that folder would have the "New Job" button point to:
      JENKINS_HOME/job/<folder_name>/view/<view_name>/newJob

      However, it continues to use:
      JENKINS_HOME/job/<folder_name>/newJob

          [JENKINS-53509] Job created inside a view inside a folder does not give the option to add the job to the view

          Devin Nusbaum added a comment - - edited

          wbagdon Thanks for opening the issue! This seems reasonable at a glance, although I am a little concerned about whether there may be any compatibility issues if the URL were changed. I think as long as it still used the current URL when the All view was selected then there would probably be no issue. That said, I don't have any plans to fix this. Maybe fcojfernandez who was recently added as a maintainer would be interested in taking a look.

          If you wanted to take a look at fixing it yourself, I think based on sidepanel.jelly in cloudbees-folder, the view variable should be defined and available to use when creating the New Item link in tasks-create.jelly, so I'd see if you can use view in tasks-create.jelly to create a better link in some cases. I'm not sure if that's the right approach, but it's what I'd look at first.

          Devin Nusbaum added a comment - - edited wbagdon Thanks for opening the issue! This seems reasonable at a glance, although I am a little concerned about whether there may be any compatibility issues if the URL were changed. I think as long as it still used the current URL when the All view was selected then there would probably be no issue. That said, I don't have any plans to fix this. Maybe fcojfernandez who was recently added as a maintainer would be interested in taking a look. If you wanted to take a look at fixing it yourself, I think based on sidepanel.jelly in cloudbees-folder, the view variable should be defined and available to use when creating the New Item link in tasks-create.jelly , so I'd see if you can use view in tasks-create.jelly to create a better link in some cases. I'm not sure if that's the right approach, but it's what I'd look at first.

          dnusbaum thanks for ping me!

           

          wbagdon I'll have a look on this, although it won't be in the short term I'm afraid. 

          Francisco Fernández added a comment - dnusbaum thanks for ping me!   wbagdon I'll have a look on this, although it won't be in the short term I'm afraid. 

            Unassigned Unassigned
            wbagdon Bill Bagdon
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: