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

Need a way to get the "real" job URL without views etc. in the path

    • Icon: New Feature New Feature
    • Resolution: Fixed
    • Icon: Minor Minor
    • core
    • None

      Currently, if I browse to a job via a view, that view name appears as part of the URL. Take the following example:

      I am a member of TeamY and am currently developing projectX. I have my own personal view for the projects I am currently working. Depending on how I get to the projectX job (via the main "All" view, the TeamY view, or my personal view), I get 3 different URLs:
      jenkins.internal.com/job/projectX
      jenkins.internal.com/view/TeamY/job/projectX
      jenkins.internal.com/me/my-views/view/MyCustomView/job/projectX

      The 3rd URL is especially problematic. If I happen to browse to projectX through my personal view, then I copy/paste that URL into an email for a teammate, the link is actually broken for that person since they do not have permission to "browse through" my view to reach projectX. Or maybe somebody not on TeamY gets the TeamY URL and can't "browse through" it.

      It seems like no matter which view I am in, when I click the link to go to projectX the URL should switch back to /job/projectX and not keep the /view or /me/my-views paths.

          [JENKINS-10595] Need a way to get the "real" job URL without views etc. in the path

          +1 on this

          A job should always been opened regardless of the view it was opened from.

          Problem is that our developers tend to use Jenkins URLs in their documentations and include view names in it, so we can't delete any view ever because that might break someones documentation/workflow/whatever.

          At the moment we're looking into the possibility to use a webserver as kind of a proxy "in front of Jenkins" to prevent this, however, I think that this kind of functionality should come from Jenkins itself.

          Steffen Breitbach added a comment - +1 on this A job should always been opened regardless of the view it was opened from. Problem is that our developers tend to use Jenkins URLs in their documentations and include view names in it, so we can't delete any view ever because that might break someones documentation/workflow/whatever. At the moment we're looking into the possibility to use a webserver as kind of a proxy "in front of Jenkins" to prevent this, however, I think that this kind of functionality should come from Jenkins itself.

          Daniel Beck added a comment -

          Not a bug, this is needed for breadcrumbs.

          Should be easy however to write a plugin that adds the canonical job URL to the job main page if the current URL is different (similar to real job name shown when display name is set), or a small link that opens a popup with the URL (similar to 'share' links on stack overflow). if that would work for you, I could look into implementing this.

          Daniel Beck added a comment - Not a bug, this is needed for breadcrumbs. Should be easy however to write a plugin that adds the canonical job URL to the job main page if the current URL is different (similar to real job name shown when display name is set), or a small link that opens a popup with the URL (similar to 'share' links on stack overflow). if that would work for you, I could look into implementing this.

          C Girard added a comment -

          I hadn't considered the breadcrumbs aspect. It's not terribly important - more just an inconvenience. But if you're in the vicinity, a 'share' link would be kind of helpful.

          C Girard added a comment - I hadn't considered the breadcrumbs aspect. It's not terribly important - more just an inconvenience. But if you're in the vicinity, a 'share' link would be kind of helpful.

          Daniel Beck added a comment -

          Changed issue title after agreement in comments.

          Daniel Beck added a comment - Changed issue title after agreement in comments.

          Daniel Beck added a comment -

          Plugin that implements this in a mostly reliable way:

          https://github.com/daniel-beck/shareable-link-plugin

          Unreleased because of limited appeal (and me being too lazy). Building this yourself should be trivial. Just create a Maven job in Jenkins, add the Git repo as source, save, and build.

          Daniel Beck added a comment - Plugin that implements this in a mostly reliable way: https://github.com/daniel-beck/shareable-link-plugin Unreleased because of limited appeal (and me being too lazy). Building this yourself should be trivial. Just create a Maven job in Jenkins, add the Git repo as source, save, and build.

            danielbeck Daniel Beck
            cgirard C Girard
            Votes:
            4 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: