Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Link to comment does not quite work because URL format changed ("/#/c/" not expected anymore) #80

Open
SylvainDe opened this issue Aug 30, 2023 · 0 comments

Comments

@SylvainDe
Copy link

On the particular instance of Gerrit I am using, the link to comments do not work. In fact, it looks like the format of the link has changed at some point (removing the "/#/c" part) and the gerritstats code was not updated accordingly.

If anyone is facing the same issue, here is the fix to change things:

--- a/GerritStats/src/main/frontend/profile/ReviewCommentsPanel.jsx
+++ b/GerritStats/src/main/frontend/profile/ReviewCommentsPanel.jsx
@@ -17,7 +17,8 @@ import SelectedUsers from '../common/model/SelectedUsers';
 function getGerritUrlForComment(commit, patchSet, comment) {
     var url = commit.url;
     var baseUrl = url.substring(0, url.lastIndexOf('/'));
-    return baseUrl + '/#/c/' + commit.commitNumber + '/' + patchSet.number + '/' + comment.file;
+    return baseUrl + '/' + commit.commitNumber + '/' + patchSet.number + '/' + comment.file;
+    //return baseUrl + '/#/c/' + commit.commitNumber + '/' + patchSet.number + '/' + comment.file;
 }
 
 function escapeHtml(text) {

I do not know when the format got changed on the Gerrit side but it is it old enough, I'm happy to provide a PR for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant