drulli: I've attached the screenshots demonstrating what's going wrong (I'm using multi-branch pipeline, folders, nested view and dashboard view plugins)
The hierarchy of the folders is the following
authentication-service » build-multi » DMC-2273-continuous-delivery
... where
- authentication-service - is the manually created folder (Folders plugin)
- build-multi - is the name of the multi-branch pipeline job
- DMC-2273-continuous-delivery - is the name of the automatically created job from the corresponding branch
I've configured a nested view develop-main with the dashboard and this view has the following URL
https://host:port/view/REPORTS/view/develop-main/
Here is the screenshot that shows the original behavior of the analysis-collector-plugin's Dashboard.
The URLs which lead us to the corresponding warnings page look like the following
https://host:port/view/REPORTS/view/develop-main/job/DMC-2273-continuous-delivery/tasks
... where
- REPORTS is the name of the view
- develop-main is the name of the multi-branch pipeline job
- DMC-2273-continuous-delivery is the name of the job that was created automatically
Updated plugin with the applied pull request leads to generation of the following URLs
https://host:port/view/REPORTS/view/develop-main/job/authentication-service/job/build-multi/job/DMC-2273-continuous-delivery/tasks
So as you can see in case of unapplied and applied patch the URLs are different
https://host:port/view/REPORTS/view/develop-main/job/DMC-2273-continuous-delivery/tasks
// vs
https://host:port/view/REPORTS/view/develop-main/job/authentication-service/job/build-multi/job/DMC-2273-continuous-delivery/tasks
... and we can see that in the first case all the intermediate folders (manually created one, and multi-branch pipeline's one) are missed.
The missed folders lead us to 404 errors, and applying a patch makes the dashboard generate correct URLs.
It also seems that according to the verifyPortlet and verifyColumn methods of the ATH only link text is verified, but not its href attribute.
We need to verify that this change does not break
JENKINS-21723. (And that the ATH test cases in AbstractAnalysisTest#should_have_trend_graph_with_relative_links_in_freestyle_job will succeed).