From 5d0682227cac737c0758bedf7896dda808776bdb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?U=C4=9Fra=C5=9F=20Erg=C3=BCn?= <96827714+ugras-ergun-sonarsource@users.noreply.github.com> Date: Thu, 2 Nov 2023 13:44:58 +0100 Subject: [PATCH] fixed the view in SQ url --- .../SonarQubeService_GetProjectDashboardUrl.cs | 2 +- src/SonarQube.Client/SonarQubeService.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/SonarQube.Client.Tests/SonarQubeService_GetProjectDashboardUrl.cs b/src/SonarQube.Client.Tests/SonarQubeService_GetProjectDashboardUrl.cs index bb62ff9c98..cc09ae6fb6 100644 --- a/src/SonarQube.Client.Tests/SonarQubeService_GetProjectDashboardUrl.cs +++ b/src/SonarQube.Client.Tests/SonarQubeService_GetProjectDashboardUrl.cs @@ -35,7 +35,7 @@ public async Task GetProjectDashboardUrl_SonarQube_ReturnsExpectedUrl() var result = service.GetProjectDashboardUrl("myProject"); - result.Should().BeEquivalentTo(new Uri("http://localhost:9000/dashboard/index/myProject")); + result.Should().BeEquivalentTo(new Uri("http://localhost:9000/dashboard?id=myProject")); } [TestMethod] diff --git a/src/SonarQube.Client/SonarQubeService.cs b/src/SonarQube.Client/SonarQubeService.cs index 9cdfa187c9..763d8043d5 100644 --- a/src/SonarQube.Client/SonarQubeService.cs +++ b/src/SonarQube.Client/SonarQubeService.cs @@ -250,7 +250,7 @@ public virtual Uri GetProjectDashboardUrl(string projectKey) { var serverInfo = EnsureIsConnected(); - const string SonarQube_ProjectDashboardRelativeUrl = "dashboard/index/{0}"; + const string SonarQube_ProjectDashboardRelativeUrl = "dashboard?id={0}"; const string SonarCloud_ProjectDashboardRelativeUrl = "project/overview?id={0}"; var urlFormat = serverInfo.ServerType == ServerType.SonarCloud ? SonarCloud_ProjectDashboardRelativeUrl : SonarQube_ProjectDashboardRelativeUrl;