Skip to content

Commit

Permalink
"View in SonarQube" returns a 404 (#5007)
Browse files Browse the repository at this point in the history
Fixes #4722
  • Loading branch information
ugras-ergun-sonarsource authored Nov 2, 2023
1 parent 0515f0f commit b6efeda
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
2 changes: 1 addition & 1 deletion src/SonarQube.Client/SonarQubeService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit b6efeda

Please sign in to comment.