-
Bug
-
Resolution: Unresolved
-
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
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.