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

Wrong URL in a view when job is in a subfolder

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Minor Minor
    • robot-plugin
    • None

      If a Jenkins job is created in a subfolder and showed as part of the view, links to log file and duration graph are not working. In addition, picture for duration graph is also not displayed.

      For example, we have a "test_project" job in a "subfolder" folder. The following URL are displayed if job is viewed directly in a subfolder:

      https://jenkins_server/job/subfolder/job/test_project/1/robot/report/log.html

      https://jenkins_server/job/subfolder/job/test_project/1/robot/durationGraph?maxBuildsToShow=15&hd

      However, if we have a view called "Tests" this is the link that plugin tries to open:

      https://jenkins_server/view/Tests/job/test_project/1/robot/report/log.html

      while the correct link should be:

      https://jenkins_server/view/Tests/job/subfolder/job/test_project/1/robot/report/log.html

      I think the problem might be in the RobotListViewColumn.java in the getRobotPath function where job should not return getShortUrl but instead getAbsoluteUrl. However, this is my guess and I am not sure if change in this method might cause problems in other parts of the plugin.

          [JENKINS-68678] Wrong URL in a view when job is in a subfolder

          Aleksi Simell added a comment -

          Hi,

          I was able to reproduce this, but getAbsoluteUrl is deprecated, so I will not use that. I'll take a look and see what would be the best way to get the correct URL path in views.

          Aleksi Simell added a comment - Hi, I was able to reproduce this, but getAbsoluteUrl is deprecated , so I will not use that. I'll take a look and see what would be the best way to get the correct URL path in views.

          Aleksi Simell added a comment -

          This has been hanging for a while, but now that I tried to reproduce this again, I notice that the URL is actually correct and the log file can be opened normally when inside a view. I'll close this as "Cannot reproduce". Please reopen if still an issue.

          Aleksi Simell added a comment - This has been hanging for a while, but now that I tried to reproduce this again, I notice that the URL is actually correct and the log file can be opened normally when inside a view. I'll close this as "Cannot reproduce". Please reopen if still an issue.

            aleksisimell Aleksi Simell
            cadnan Adnan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: