Remove enableAttentionSet flag.
Attention set feature was added in 2020Q2 and is a vital part of
Gerrit. It's important to the reviewing flow. Previously two options
existed Assignee and Attention Set. With this change we no longer
support the option of disabling it.
Release-Notes: Remove option to disable Attention Set
Google-Bug-Id: b/267456422
Change-Id: I30dbb069ce3d90e5a9f4e70baa01d26f6404414f
diff --git a/Documentation/config-gerrit.txt b/Documentation/config-gerrit.txt
index 8d30db2..e970a13 100644
--- a/Documentation/config-gerrit.txt
+++ b/Documentation/config-gerrit.txt
@@ -1415,13 +1415,6 @@
+
The default is false.
-[[change.enableAttentionSet]]change.enableAttentionSet::
-+
-If set to true, then all UI features for using and interacting with the
-attention set are enabled.
-+
-The default is true.
-
[[change.enableAssignee]]change.enableAssignee::
+
If set to true, then all UI features for using and interacting with the
diff --git a/Documentation/index.txt b/Documentation/index.txt
index 89b88aa..ee2c289 100644
--- a/Documentation/index.txt
+++ b/Documentation/index.txt
@@ -22,12 +22,13 @@
. link:intro-project-owner.html[Project Owner Guide]
. link:https://source.android.com/source/developing[Default Android Workflow,role=external,window=_blank] (external)
-== Tutorials
+== Features and Workflows
. Web
.. link:user-review-ui.html[Review UI Overview]
.. link:user-search.html[Searching Changes]
.. link:user-inline-edit.html[Manipulating Changes in Browser]
.. link:user-notify.html[Subscribing to Email Notifications]
+.. link:user-attention-set.html[Attention Set]
. SSH
.. link:user-upload.html#ssh[SSH connection details]
.. link:cmd-index.html[Command Line Tools]
diff --git a/Documentation/rest-api-config.txt b/Documentation/rest-api-config.txt
index 505def0..114dcba 100644
--- a/Documentation/rest-api-config.txt
+++ b/Documentation/rest-api-config.txt
@@ -1575,8 +1575,6 @@
configuration parameter] that controls whether the mergeability bit in
link:rest-api-changes.html#change-info[ChangeInfo] will never be set and if the
bit is indexed.
-|`enable_attention_set` |defaults to `false`|
-Returns true if attention set UI features are enabled.
|`enable_assignee` |defaults to `true`|
Returns true if assignee related UI features are enabled.
|=============================
diff --git a/Documentation/user-attention-set.txt b/Documentation/user-attention-set.txt
index 5e5d3f8..738205a 100644
--- a/Documentation/user-attention-set.txt
+++ b/Documentation/user-attention-set.txt
@@ -164,13 +164,7 @@
=== For Gerrit Admins
-The Attention Set has been available since the 3.3 release (late 2020). It
-is enabled by default, but you can disable it by setting
-link:config-gerrit.html#change.enableAttentionSet[enableAttentionSet] to false.
-
-As part of Gerrit 3.3 upgrade, the user group "Non-Interactive Users" is
-renamed "Service Users". For a new installation, the group is automatically
-created upon initialization.
+The Attention Set has been available since the 3.3 release (late 2020).
=== Important note for all host owners, project owners, and bot owners
diff --git a/Documentation/user-review-ui.txt b/Documentation/user-review-ui.txt
index 780d3ec..39929e1 100644
--- a/Documentation/user-review-ui.txt
+++ b/Documentation/user-review-ui.txt
@@ -116,7 +116,7 @@
need to vote/review. If the CC'ed user votes they are moved to reviewers.
+
-- [[attention-set]]Attention set:
+- [[attention-set]]link:user-attention-set.html[Attention set]:
+
Users in attention set are marked by "chevron" symbol (see screenshot above).
The mark indicates that there are actions their attention is required on the
diff --git a/java/com/google/gerrit/extensions/common/ChangeConfigInfo.java b/java/com/google/gerrit/extensions/common/ChangeConfigInfo.java
index fc09b49..0142e01 100644
--- a/java/com/google/gerrit/extensions/common/ChangeConfigInfo.java
+++ b/java/com/google/gerrit/extensions/common/ChangeConfigInfo.java
@@ -22,6 +22,5 @@
public int updateDelay;
public Boolean submitWholeTopic;
public String mergeabilityComputationBehavior;
- public Boolean enableAttentionSet;
public Boolean enableAssignee;
}
diff --git a/java/com/google/gerrit/httpd/raw/IndexPreloadingUtil.java b/java/com/google/gerrit/httpd/raw/IndexPreloadingUtil.java
index 5cf63d9..8b7781f 100644
--- a/java/com/google/gerrit/httpd/raw/IndexPreloadingUtil.java
+++ b/java/com/google/gerrit/httpd/raw/IndexPreloadingUtil.java
@@ -195,9 +195,7 @@
public static List<String> computeDashboardQueryList(Server serverApi) throws RestApiException {
List<String> queryList = new ArrayList<>();
queryList.add(SELF_DASHBOARD_HAS_UNPUBLISHED_DRAFTS_QUERY);
- if (isEnabledAttentionSet(serverApi)) {
- queryList.add(SELF_YOUR_TURN);
- }
+ queryList.add(SELF_YOUR_TURN);
if (isEnabledAssignee(serverApi)) {
queryList.add(SELF_DASHBOARD_ASSIGNED_QUERY);
}
@@ -207,13 +205,6 @@
return queryList;
}
- private static boolean isEnabledAttentionSet(Server serverApi) throws RestApiException {
- return serverApi.getInfo() != null
- && serverApi.getInfo().change != null
- && serverApi.getInfo().change.enableAttentionSet != null
- && serverApi.getInfo().change.enableAttentionSet;
- }
-
private static boolean isEnabledAssignee(Server serverApi) throws RestApiException {
return serverApi.getInfo() != null
&& serverApi.getInfo().change != null
diff --git a/java/com/google/gerrit/server/mail/EmailSettings.java b/java/com/google/gerrit/server/mail/EmailSettings.java
index 15b61d0..c411af5 100644
--- a/java/com/google/gerrit/server/mail/EmailSettings.java
+++ b/java/com/google/gerrit/server/mail/EmailSettings.java
@@ -38,7 +38,6 @@
public final Encryption encryption;
public final long fetchInterval; // in milliseconds
public final boolean sendNewPatchsetEmails;
- public final boolean isAttentionSetEnabled;
@Inject
EmailSettings(@GerritServerConfig Config cfg) {
@@ -61,6 +60,5 @@
TimeUnit.MILLISECONDS.convert(60, TimeUnit.SECONDS),
TimeUnit.MILLISECONDS);
sendNewPatchsetEmails = cfg.getBoolean("change", null, "sendNewPatchsetEmails", true);
- isAttentionSetEnabled = cfg.getBoolean("change", null, "enableAttentionSet", true);
}
}
diff --git a/java/com/google/gerrit/server/mail/send/ChangeEmail.java b/java/com/google/gerrit/server/mail/send/ChangeEmail.java
index 8be5548..2a683ba 100644
--- a/java/com/google/gerrit/server/mail/send/ChangeEmail.java
+++ b/java/com/google/gerrit/server/mail/send/ChangeEmail.java
@@ -558,8 +558,7 @@
for (Account.Id attentionUser : currentAttentionSet) {
footers.add(MailHeader.ATTENTION.withDelimiter() + getNameEmailFor(attentionUser));
}
- // Since this would be user visible, only show it if attention set is enabled
- if (args.settings.isAttentionSetEnabled && !currentAttentionSet.isEmpty()) {
+ if (!currentAttentionSet.isEmpty()) {
// We need names rather than account ids / emails to make it user readable.
soyContext.put(
"attentionSet",
diff --git a/java/com/google/gerrit/server/restapi/config/GetServerInfo.java b/java/com/google/gerrit/server/restapi/config/GetServerInfo.java
index 103a5ac..d0a6d51 100644
--- a/java/com/google/gerrit/server/restapi/config/GetServerInfo.java
+++ b/java/com/google/gerrit/server/restapi/config/GetServerInfo.java
@@ -232,8 +232,6 @@
toBoolean(this.config.getBoolean("change", null, "disablePrivateChanges", false));
info.mergeabilityComputationBehavior =
MergeabilityComputationBehavior.fromConfig(config).name();
- info.enableAttentionSet =
- toBoolean(this.config.getBoolean("change", null, "enableAttentionSet", true));
info.enableAssignee =
toBoolean(this.config.getBoolean("change", null, "enableAssignee", false));
return info;
diff --git a/javatests/com/google/gerrit/acceptance/rest/change/AttentionSetIT.java b/javatests/com/google/gerrit/acceptance/rest/change/AttentionSetIT.java
index ea52690..443e064 100644
--- a/javatests/com/google/gerrit/acceptance/rest/change/AttentionSetIT.java
+++ b/javatests/com/google/gerrit/acceptance/rest/change/AttentionSetIT.java
@@ -1613,7 +1613,6 @@
}
@Test
- @GerritConfig(name = "change.enableAttentionSet", value = "true")
public void attentionSetEmailHeader() throws Exception {
PushOneCommit.Result r = createChange();
TestAccount user2 = accountCreator.user2();
@@ -1654,21 +1653,6 @@
}
@Test
- @GerritConfig(name = "change.enableAttentionSet", value = "false")
- public void noReferenceToAttentionSetInEmailsWhenDisabled() throws Exception {
- PushOneCommit.Result r = createChange();
- // Add user and to the attention set.
- change(r).addReviewer(user.id().toString());
-
- // Attention set is not referenced.
- assertThat(Iterables.getOnlyElement(sender.getMessages()).body())
- .doesNotContain("Attention is currently required");
- assertThat(Iterables.getOnlyElement(sender.getMessages()).htmlBody())
- .doesNotContain("Attention is currently required");
- sender.clear();
- }
-
- @Test
public void attentionSetWithEmailFilter() throws Exception {
PushOneCommit.Result r = createChange();
diff --git a/javatests/com/google/gerrit/acceptance/rest/config/ServerInfoIT.java b/javatests/com/google/gerrit/acceptance/rest/config/ServerInfoIT.java
index 8131352..72901ac 100644
--- a/javatests/com/google/gerrit/acceptance/rest/config/ServerInfoIT.java
+++ b/javatests/com/google/gerrit/acceptance/rest/config/ServerInfoIT.java
@@ -60,7 +60,6 @@
// change
@GerritConfig(name = "change.updateDelay", value = "50s")
@GerritConfig(name = "change.disablePrivateChanges", value = "true")
- @GerritConfig(name = "change.enableAttentionSet", value = "true")
@GerritConfig(name = "change.enableAssignee", value = "true")
// download
@@ -102,7 +101,6 @@
// change
assertThat(i.change.updateDelay).isEqualTo(50);
assertThat(i.change.disablePrivateChanges).isTrue();
- assertThat(i.change.enableAttentionSet).isTrue();
assertThat(i.change.enableAssignee).isTrue();
// download