Merge changes I2b80c1b1,I06fee550

* changes:
  Remove Assignee from configs.
  Remove assignee from Change value classes.
diff --git a/Documentation/rest-api-changes.txt b/Documentation/rest-api-changes.txt
index b761687..75d8847 100644
--- a/Documentation/rest-api-changes.txt
+++ b/Documentation/rest-api-changes.txt
@@ -6878,9 +6878,6 @@
 accounts that were in the attention set but were removed. The
 link:#attention-set-info[AttentionSetInfo] is the latest and most recent removal
  of the account from the attention set.
-|`assignee`           |optional|
-The assignee of the change as an link:rest-api-accounts.html#account-info[
-AccountInfo] entity.
 |`hashtags`           |optional|
 List of hashtags that are set on the change.
 |`change_id`          ||The Change-Id of the change.
diff --git a/java/com/google/gerrit/acceptance/AbstractNotificationTest.java b/java/com/google/gerrit/acceptance/AbstractNotificationTest.java
index da033c1..8a9e56a 100644
--- a/java/com/google/gerrit/acceptance/AbstractNotificationTest.java
+++ b/java/com/google/gerrit/acceptance/AbstractNotificationTest.java
@@ -343,7 +343,6 @@
     public final TestAccount reviewer;
     public final TestAccount ccer;
     public final TestAccount starrer;
-    public final TestAccount assignee;
     public final TestAccount watchingProjectOwner;
     private final Map<NotifyType, TestAccount> watchers = new HashMap<>();
     private final Map<String, TestAccount> accountsByEmail = new HashMap<>();
@@ -369,7 +368,6 @@
           reviewer = reindexAndCopy(existing.reviewer);
           ccer = reindexAndCopy(existing.ccer);
           starrer = reindexAndCopy(existing.starrer);
-          assignee = reindexAndCopy(existing.assignee);
           watchingProjectOwner = reindexAndCopy(existing.watchingProjectOwner);
           watchers.putAll(existing.watchers);
           return;
@@ -381,7 +379,6 @@
         uploader = testAccount("uploader");
         ccer = testAccount("ccer");
         starrer = testAccount("starrer");
-        assignee = testAccount("assignee");
 
         watchingProjectOwner = testAccount("watchingProjectOwner", "Administrators");
         requestScopeOperations.setApiUser(watchingProjectOwner.id());
diff --git a/java/com/google/gerrit/entities/Change.java b/java/com/google/gerrit/entities/Change.java
index 55220f3..56fb748 100644
--- a/java/com/google/gerrit/entities/Change.java
+++ b/java/com/google/gerrit/entities/Change.java
@@ -477,9 +477,6 @@
    */
   @Nullable private String submissionId;
 
-  /** Allows assigning a change to a user. */
-  @Nullable private Account.Id assignee;
-
   /** Whether the change is private. */
   private boolean isPrivate;
 
@@ -509,7 +506,6 @@
   }
 
   public Change(Change other) {
-    assignee = other.assignee;
     changeId = other.changeId;
     changeKey = other.changeKey;
     createdOn = other.createdOn;
@@ -548,14 +544,6 @@
     changeKey = k;
   }
 
-  public Account.Id getAssignee() {
-    return assignee;
-  }
-
-  public void setAssignee(Account.Id a) {
-    assignee = a;
-  }
-
   public Instant getCreatedOn() {
     return createdOn;
   }
diff --git a/java/com/google/gerrit/entities/converter/ChangeProtoConverter.java b/java/com/google/gerrit/entities/converter/ChangeProtoConverter.java
index 4903364..3b772d0 100644
--- a/java/com/google/gerrit/entities/converter/ChangeProtoConverter.java
+++ b/java/com/google/gerrit/entities/converter/ChangeProtoConverter.java
@@ -71,10 +71,6 @@
     if (submissionId != null) {
       builder.setSubmissionId(submissionId);
     }
-    Account.Id assignee = change.getAssignee();
-    if (assignee != null) {
-      builder.setAssignee(accountIdConverter.toProto(assignee));
-    }
     Change.Id revertOf = change.getRevertOf();
     if (revertOf != null) {
       builder.setRevertOf(changeIdConverter.toProto(revertOf));
@@ -114,9 +110,6 @@
     if (proto.hasSubmissionId()) {
       change.setSubmissionId(proto.getSubmissionId());
     }
-    if (proto.hasAssignee()) {
-      change.setAssignee(accountIdConverter.fromProto(proto.getAssignee()));
-    }
     change.setPrivate(proto.getIsPrivate());
     change.setWorkInProgress(proto.getWorkInProgress());
     change.setReviewStarted(proto.getReviewStarted());
diff --git a/java/com/google/gerrit/extensions/client/GeneralPreferencesInfo.java b/java/com/google/gerrit/extensions/client/GeneralPreferencesInfo.java
index 1ee2cd8..020351b 100644
--- a/java/com/google/gerrit/extensions/client/GeneralPreferencesInfo.java
+++ b/java/com/google/gerrit/extensions/client/GeneralPreferencesInfo.java
@@ -134,7 +134,6 @@
   public DateFormat dateFormat;
   public TimeFormat timeFormat;
   public Boolean expandInlineDiffs;
-  public Boolean highlightAssigneeInChangeTable;
   public Boolean relativeDateInChangeTable;
   public DiffView diffView;
   public Boolean sizeBarInChangeTable;
@@ -195,7 +194,6 @@
     p.dateFormat = DateFormat.STD;
     p.timeFormat = TimeFormat.HHMM_12;
     p.expandInlineDiffs = false;
-    p.highlightAssigneeInChangeTable = true;
     p.relativeDateInChangeTable = false;
     p.diffView = DiffView.SIDE_BY_SIDE;
     p.sizeBarInChangeTable = true;
diff --git a/java/com/google/gerrit/extensions/common/ChangeConfigInfo.java b/java/com/google/gerrit/extensions/common/ChangeConfigInfo.java
index 0142e01..f85279c 100644
--- a/java/com/google/gerrit/extensions/common/ChangeConfigInfo.java
+++ b/java/com/google/gerrit/extensions/common/ChangeConfigInfo.java
@@ -17,10 +17,8 @@
 /** API response containing values from the {@code change} section of {@code gerrit.config}. */
 public class ChangeConfigInfo {
   public Boolean allowBlame;
-  public Boolean showAssigneeInChangesTable;
   public Boolean disablePrivateChanges;
   public int updateDelay;
   public Boolean submitWholeTopic;
   public String mergeabilityComputationBehavior;
-  public Boolean enableAssignee;
 }
diff --git a/java/com/google/gerrit/extensions/common/ChangeInfo.java b/java/com/google/gerrit/extensions/common/ChangeInfo.java
index a865187..b40e100 100644
--- a/java/com/google/gerrit/extensions/common/ChangeInfo.java
+++ b/java/com/google/gerrit/extensions/common/ChangeInfo.java
@@ -49,7 +49,6 @@
 
   public Map<Integer, AttentionSetInfo> removedFromAttentionSet;
 
-  public AccountInfo assignee;
   public Collection<String> hashtags;
   public String changeId;
   public String subject;
diff --git a/java/com/google/gerrit/server/change/ActionJson.java b/java/com/google/gerrit/server/change/ActionJson.java
index a9d5959..e5a9534 100644
--- a/java/com/google/gerrit/server/change/ActionJson.java
+++ b/java/com/google/gerrit/server/change/ActionJson.java
@@ -123,7 +123,6 @@
         changeInfo.removedFromAttentionSet == null
             ? null
             : ImmutableMap.copyOf(changeInfo.removedFromAttentionSet);
-    copy.assignee = changeInfo.assignee;
     copy.hashtags = changeInfo.hashtags;
     copy.changeId = changeInfo.changeId;
     copy.submitType = changeInfo.submitType;
diff --git a/java/com/google/gerrit/server/change/ChangeJson.java b/java/com/google/gerrit/server/change/ChangeJson.java
index 912d202..f733a7b 100644
--- a/java/com/google/gerrit/server/change/ChangeJson.java
+++ b/java/com/google/gerrit/server/change/ChangeJson.java
@@ -617,7 +617,6 @@
                       a -> a.account().get(),
                       a -> AttentionSetUtil.createAttentionSetInfo(a, accountLoader)));
     }
-    out.assignee = in.getAssignee() != null ? accountLoader.get(in.getAssignee()) : null;
     out.hashtags = cd.hashtags();
     out.changeId = in.getKey().get();
     if (in.isNew()) {
diff --git a/java/com/google/gerrit/server/change/ChangeResource.java b/java/com/google/gerrit/server/change/ChangeResource.java
index 919586e..c5c0be0 100644
--- a/java/com/google/gerrit/server/change/ChangeResource.java
+++ b/java/com/google/gerrit/server/change/ChangeResource.java
@@ -177,9 +177,6 @@
     byte[] buf = new byte[20];
     Set<Account.Id> accounts = new HashSet<>();
     accounts.add(getChange().getOwner());
-    if (getChange().getAssignee() != null) {
-      accounts.add(getChange().getAssignee());
-    }
     try {
       patchSetUtil.byChange(getNotes()).stream().map(PatchSet::uploader).forEach(accounts::add);
 
diff --git a/java/com/google/gerrit/server/restapi/config/GetServerInfo.java b/java/com/google/gerrit/server/restapi/config/GetServerInfo.java
index 66536dd..903e5b1 100644
--- a/java/com/google/gerrit/server/restapi/config/GetServerInfo.java
+++ b/java/com/google/gerrit/server/restapi/config/GetServerInfo.java
@@ -55,8 +55,6 @@
 import com.google.gerrit.server.config.GerritServerConfig;
 import com.google.gerrit.server.config.SitePaths;
 import com.google.gerrit.server.documentation.QueryDocumentationExecutor;
-import com.google.gerrit.server.index.change.ChangeField;
-import com.google.gerrit.server.index.change.ChangeIndexCollection;
 import com.google.gerrit.server.permissions.PermissionBackendException;
 import com.google.gerrit.server.plugincontext.PluginItemContext;
 import com.google.gerrit.server.plugincontext.PluginMapContext;
@@ -93,7 +91,6 @@
   private final QueryDocumentationExecutor docSearcher;
   private final ProjectCache projectCache;
   private final AgreementJson agreementJson;
-  private final ChangeIndexCollection indexes;
   private final SitePaths sitePaths;
 
   @Inject
@@ -116,7 +113,6 @@
       QueryDocumentationExecutor docSearcher,
       ProjectCache projectCache,
       AgreementJson agreementJson,
-      ChangeIndexCollection indexes,
       SitePaths sitePaths) {
     this.config = config;
     this.accountVisibilityProvider = accountVisibilityProvider;
@@ -136,7 +132,6 @@
     this.docSearcher = docSearcher;
     this.projectCache = projectCache;
     this.agreementJson = agreementJson;
-    this.indexes = indexes;
     this.sitePaths = sitePaths;
   }
 
@@ -220,11 +215,6 @@
   private ChangeConfigInfo getChangeInfo() {
     ChangeConfigInfo info = new ChangeConfigInfo();
     info.allowBlame = toBoolean(config.getBoolean("change", "allowBlame", true));
-    boolean hasAssigneeInIndex =
-        indexes.getSearchIndex().getSchema().hasField(ChangeField.ASSIGNEE_SPEC);
-    info.showAssigneeInChangesTable =
-        toBoolean(
-            config.getBoolean("change", "showAssigneeInChangesTable", false) && hasAssigneeInIndex);
     info.updateDelay =
         (int) ConfigUtil.getTimeUnit(config, "change", null, "updateDelay", 300, TimeUnit.SECONDS);
     info.submitWholeTopic = toBoolean(MergeSuperSet.wholeTopicEnabled(config));
@@ -232,7 +222,6 @@
         toBoolean(this.config.getBoolean("change", null, "disablePrivateChanges", false));
     info.mergeabilityComputationBehavior =
         MergeabilityComputationBehavior.fromConfig(config).name();
-    info.enableAssignee = false;
     return info;
   }
 
diff --git a/javatests/com/google/gerrit/acceptance/api/accounts/GeneralPreferencesIT.java b/javatests/com/google/gerrit/acceptance/api/accounts/GeneralPreferencesIT.java
index f5b311b..5745a4e 100644
--- a/javatests/com/google/gerrit/acceptance/api/accounts/GeneralPreferencesIT.java
+++ b/javatests/com/google/gerrit/acceptance/api/accounts/GeneralPreferencesIT.java
@@ -78,7 +78,6 @@
     i.defaultBaseForMerges = DefaultBase.AUTO_MERGE;
     i.disableKeyboardShortcuts = true;
     i.expandInlineDiffs ^= true;
-    i.highlightAssigneeInChangeTable ^= true;
     i.relativeDateInChangeTable ^= true;
     i.sizeBarInChangeTable ^= true;
     i.legacycidInChangeTable ^= true;
diff --git a/javatests/com/google/gerrit/entities/converter/ChangeProtoConverterTest.java b/javatests/com/google/gerrit/entities/converter/ChangeProtoConverterTest.java
index bd4b2b1..bbf10bd 100644
--- a/javatests/com/google/gerrit/entities/converter/ChangeProtoConverterTest.java
+++ b/javatests/com/google/gerrit/entities/converter/ChangeProtoConverterTest.java
@@ -48,7 +48,6 @@
         PatchSet.id(Change.id(14), 23), "subject XYZ", "original subject ABC");
     change.setTopic("my topic");
     change.setSubmissionId("submission ID 234");
-    change.setAssignee(Account.id(100001));
     change.setPrivate(true);
     change.setWorkInProgress(true);
     change.setReviewStarted(true);
@@ -73,7 +72,6 @@
             .setTopic("my topic")
             .setOriginalSubject("original subject ABC")
             .setSubmissionId("submission ID 234")
-            .setAssignee(Entities.Account_Id.newBuilder().setId(100001))
             .setIsPrivate(true)
             .setWorkInProgress(true)
             .setReviewStarted(true)
@@ -205,7 +203,6 @@
         PatchSet.id(Change.id(14), 23), "subject XYZ", "original subject ABC");
     change.setTopic("my topic");
     change.setSubmissionId("submission ID 234");
-    change.setAssignee(Account.id(100001));
     change.setPrivate(true);
     change.setWorkInProgress(true);
     change.setReviewStarted(true);
@@ -289,7 +286,6 @@
                 .put("topic", String.class)
                 .put("originalSubject", String.class)
                 .put("submissionId", String.class)
-                .put("assignee", Account.Id.class)
                 .put("isPrivate", boolean.class)
                 .put("workInProgress", boolean.class)
                 .put("reviewStarted", boolean.class)
@@ -313,7 +309,6 @@
     assertThat(change.getTopic()).isEqualTo(expectedChange.getTopic());
     assertThat(change.getOriginalSubject()).isEqualTo(expectedChange.getOriginalSubject());
     assertThat(change.getSubmissionId()).isEqualTo(expectedChange.getSubmissionId());
-    assertThat(change.getAssignee()).isEqualTo(expectedChange.getAssignee());
     assertThat(change.isPrivate()).isEqualTo(expectedChange.isPrivate());
     assertThat(change.isWorkInProgress()).isEqualTo(expectedChange.isWorkInProgress());
     assertThat(change.hasReviewStarted()).isEqualTo(expectedChange.hasReviewStarted());
diff --git a/javatests/com/google/gerrit/extensions/common/ChangeInfoDifferTest.java b/javatests/com/google/gerrit/extensions/common/ChangeInfoDifferTest.java
index 8a7d25a..3704969 100644
--- a/javatests/com/google/gerrit/extensions/common/ChangeInfoDifferTest.java
+++ b/javatests/com/google/gerrit/extensions/common/ChangeInfoDifferTest.java
@@ -94,61 +94,6 @@
   }
 
   @Test
-  public void getDiff_givenEqualAssignees_returnsNullAssignee() {
-    ChangeInfo oldChangeInfo =
-        createChangeInfoWithAccount(new AccountInfo("name", "mail@mail.com"));
-    ChangeInfo newChangeInfo =
-        createChangeInfoWithAccount(
-            new AccountInfo(oldChangeInfo.assignee.name, oldChangeInfo.assignee.email));
-
-    ChangeInfoDifference diff = ChangeInfoDiffer.getDifference(oldChangeInfo, newChangeInfo);
-
-    assertThat(diff.added().assignee).isNull();
-    assertThat(diff.removed().assignee).isNull();
-  }
-
-  @Test
-  public void getDiff_givenNewAssignee_returnsAssignee() {
-    ChangeInfo oldChangeInfo = new ChangeInfo();
-    ChangeInfo newChangeInfo =
-        createChangeInfoWithAccount(new AccountInfo("name", "mail@mail.com"));
-
-    ChangeInfoDifference diff = ChangeInfoDiffer.getDifference(oldChangeInfo, newChangeInfo);
-
-    assertThat(diff.added().assignee).isEqualTo(newChangeInfo.assignee);
-    assertThat(diff.removed().assignee).isNull();
-  }
-
-  @Test
-  public void getDiff_withRemovedAssignee_returnsAssignee() {
-    ChangeInfo oldChangeInfo =
-        createChangeInfoWithAccount(new AccountInfo("name", "mail@mail.com"));
-    ChangeInfo newChangeInfo = new ChangeInfo();
-
-    ChangeInfoDifference diff = ChangeInfoDiffer.getDifference(oldChangeInfo, newChangeInfo);
-
-    assertThat(diff.added().assignee).isNull();
-    assertThat(diff.removed().assignee).isEqualTo(oldChangeInfo.assignee);
-  }
-
-  @Test
-  public void getDiff_givenAssigneeWithNewName_returnsNameButNotEmail() {
-    ChangeInfo oldChangeInfo =
-        createChangeInfoWithAccount(new AccountInfo("old name", "mail@mail.com"));
-    ChangeInfo newChangeInfo =
-        createChangeInfoWithAccount(new AccountInfo("new name", oldChangeInfo.assignee.email));
-
-    ChangeInfoDifference diff = ChangeInfoDiffer.getDifference(oldChangeInfo, newChangeInfo);
-
-    assertThat(diff.added().assignee).isNotNull();
-    assertThat(diff.added().assignee.name).isEqualTo(newChangeInfo.assignee.name);
-    assertThat(diff.added().assignee.email).isNull();
-    assertThat(diff.removed().assignee).isNotNull();
-    assertThat(diff.removed().assignee.name).isEqualTo(oldChangeInfo.assignee.name);
-    assertThat(diff.removed().assignee.email).isNull();
-  }
-
-  @Test
   public void getDiff_whenHashtagsChanged_returnsHashtags() {
     String removedHashtag = "removed";
     String addedHashtag = "added";
@@ -708,12 +653,6 @@
     return changeInfo;
   }
 
-  private static ChangeInfo createChangeInfoWithAccount(AccountInfo accountInfo) {
-    ChangeInfo changeInfo = new ChangeInfo();
-    changeInfo.assignee = accountInfo;
-    return changeInfo;
-  }
-
   private static ChangeInfo createChangeInfoWithHashtags(String... hashtags) {
     ChangeInfo changeInfo = new ChangeInfo();
     changeInfo.hashtags = ImmutableList.copyOf(hashtags);
diff --git a/proto/entities.proto b/proto/entities.proto
index 0dc6441..f89e0f0 100644
--- a/proto/entities.proto
+++ b/proto/entities.proto
@@ -45,7 +45,6 @@
   optional string topic = 14;
   optional string original_subject = 17;
   optional string submission_id = 18;
-  optional Account_Id assignee = 19;
   optional bool is_private = 20;
   optional bool work_in_progress = 21;
   optional bool review_started = 22;
@@ -59,6 +58,7 @@
   reserved 11;   // nbrPatchSets
   reserved 15;   // lastSha1MergeTested
   reserved 16;   // mergeable
+  reserved 19;   // assignee
   reserved 101;  // note_db_state
 }