Make bug report URL unset by default
There are still many issues [1, 2, 3 and more] being reported on the Gerrit issue tracker that are not related to Gerrit at all. These are most likely from users who have blindly clicked through from a Gerrit site that is installed with the defaults. The default URL makes sense on gerrit-review.googlesource.com because it's most likely that users do actually want to report a bug on Gerrit itself. However for most other cases, many users are going to assume that it links to the issue tracker for the project(s) that is/are being reviewed. As an example of this, we see quite a lot of issues being reported from the cyanogenmod review site [4] and the Android open source project's review site [5]. Both of those are set up with the default URL. Instead of defaulting to the Gerrit issue tracker, leave the bug report URL unset if not explicitly specified in the config. This change effects all installations, newly initialized or already existing. The site configuration for gerrit-review.googlesource.com will need to be updated to explicitly configure the bug report URL. [1] http://code.google.com/p/gerrit/issues/detail?id=3037 [2] http://code.google.com/p/gerrit/issues/detail?id=3036 [3] http://code.google.com/p/gerrit/issues/detail?id=3028 [4] http://review.cyanogenmod.org/ [5] https://android-review.googlesource.com/ Change-Id: I5c87d456868c37d9bf4cf42dc2ec93beab3444c4
This commit is contained in:
@@ -1537,15 +1537,17 @@ same host as Gerrit.
|
||||
|
||||
[[gerrit.reportBugUrl]]gerrit.reportBugUrl::
|
||||
+
|
||||
URL to direct users to when they need to report a bug about the
|
||||
Gerrit service. By default this links to the upstream Gerrit
|
||||
Code Review's own bug tracker but could be directed to the system
|
||||
administrator's ticket queue.
|
||||
URL to direct users to when they need to report a bug.
|
||||
+
|
||||
By default unset, meaning no bug report URL will be displayed. Administrators
|
||||
should set this to the URL of their issue tracker, if necessary.
|
||||
|
||||
[[gerrit.reportBugText]]gerrit.reportBugText::
|
||||
+
|
||||
Text to be displayed in the link to the bug report URL.
|
||||
+
|
||||
Only used when `gerrit.reportBugUrl` is set.
|
||||
+
|
||||
Defaults to "Report Bug".
|
||||
|
||||
[[gerrit.changeScreen]]gerrit.changeScreen::
|
||||
|
@@ -472,14 +472,17 @@ public class Gerrit implements EntryPoint {
|
||||
|
||||
btmmenu.add(new InlineHTML(M.poweredBy(vs)));
|
||||
|
||||
final String reportBugText = getConfig().getReportBugText();
|
||||
String reportBugUrl = getConfig().getReportBugUrl();
|
||||
if (reportBugUrl != null) {
|
||||
String reportBugText = getConfig().getReportBugText();
|
||||
Anchor a = new Anchor(
|
||||
reportBugText == null ? C.reportBug() : reportBugText,
|
||||
getConfig().getReportBugUrl());
|
||||
reportBugUrl);
|
||||
a.setTarget("_blank");
|
||||
a.setStyleName("");
|
||||
btmmenu.add(new InlineLabel(" | "));
|
||||
btmmenu.add(a);
|
||||
}
|
||||
btmmenu.add(new InlineLabel(" | "));
|
||||
btmmenu.add(new InlineLabel(C.keyHelp()));
|
||||
}
|
||||
|
@@ -148,9 +148,7 @@ class GerritConfigProvider implements Provider<GerritConfig> {
|
||||
|
||||
config.setNewFeatures(cfg.getBoolean("gerrit", "enableNewFeatures", true));
|
||||
|
||||
final String reportBugUrl = cfg.getString("gerrit", null, "reportBugUrl");
|
||||
config.setReportBugUrl(reportBugUrl != null ?
|
||||
reportBugUrl : "http://code.google.com/p/gerrit/issues/list");
|
||||
config.setReportBugUrl(cfg.getString("gerrit", null, "reportBugUrl"));
|
||||
config.setReportBugText(cfg.getString("gerrit", null, "reportBugText"));
|
||||
|
||||
final Set<Account.FieldName> fields = new HashSet<>();
|
||||
|
Reference in New Issue
Block a user