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

MultiJob project main page produces a wrong link to a phase item if opened from a View

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • multijob-plugin
    • None

      Reproduction steps:
      1. Create a multi-job project in the Jenkins root
      2. Create a folder in the Jenkins root (e.g. "folder")
      3. Create a job in the folder (e.g. "foo")
      4. Set it as one of the phases of the multi-job build and save
      5. Create a view (e.g. "MyView") in the root, include the multi-job project there
      6. Go to the view, open the multijob project there
      7. If you click on the reference to the job in the folder, the URL points to a non-existent page

      Example of the broken link: http://localhost:8080/jenkins/view/MyView/job/foo/

      • Folder link is lost, because shortUrl does not retain it
      • If we try this case without a View, everything works well => probably there is a bug in Jenkins core

      I propose too replace the implementation to Job's absolute url in order to always produce a valid link. The current approach won't work in general, because Views may not contain the multijob's items

          [JENKINS-30262] MultiJob project main page produces a wrong link to a phase item if opened from a View

          Code changed in jenkins
          User: Oleg Nenashev
          Path:
          src/main/resources/com/tikal/jenkins/plugins/multijob/views/JobColumn/column.jelly
          http://jenkins-ci.org/commit/tikal-multijob-plugin/2517c32dd98a099c845bbcfe1409db6e5b300439
          Log:
          [FIXED JENKINS-30262] - Always use absolute URLs in MultiJob's JobColumn

          The change replaces the implementation to Job's absolute url in order to always produce a valid link. The original approach does not work in general, because Views may not contain the multijob's items => relative paths may be broken.

          Ridiculously, there's the same gloth in /lib/hudson/jobLink for the supported version core. It needs to be investigated separately

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: src/main/resources/com/tikal/jenkins/plugins/multijob/views/JobColumn/column.jelly http://jenkins-ci.org/commit/tikal-multijob-plugin/2517c32dd98a099c845bbcfe1409db6e5b300439 Log: [FIXED JENKINS-30262] - Always use absolute URLs in MultiJob's JobColumn The change replaces the implementation to Job's absolute url in order to always produce a valid link. The original approach does not work in general, because Views may not contain the multijob's items => relative paths may be broken. Ridiculously, there's the same gloth in /lib/hudson/jobLink for the supported version core. It needs to be investigated separately

          Code changed in jenkins
          User: itaior
          Path:
          src/main/resources/com/tikal/jenkins/plugins/multijob/views/JobColumn/column.jelly
          http://jenkins-ci.org/commit/tikal-multijob-plugin/57c9d09c4707cef0341236eb365f60d8c2ebf917
          Log:
          Merge pull request #72 from oleg-nenashev/JENKINS-30262

          [FIXED JENKINS-30262] - Always use absolute URLs in MultiJob's JobColumn

          Compare: https://github.com/jenkinsci/tikal-multijob-plugin/compare/17c94362f011...57c9d09c4707

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: itaior Path: src/main/resources/com/tikal/jenkins/plugins/multijob/views/JobColumn/column.jelly http://jenkins-ci.org/commit/tikal-multijob-plugin/57c9d09c4707cef0341236eb365f60d8c2ebf917 Log: Merge pull request #72 from oleg-nenashev/ JENKINS-30262 [FIXED JENKINS-30262] - Always use absolute URLs in MultiJob's JobColumn Compare: https://github.com/jenkinsci/tikal-multijob-plugin/compare/17c94362f011...57c9d09c4707

            oleg_nenashev Oleg Nenashev
            oleg_nenashev Oleg Nenashev
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: