Add AssigneeStatusUpdate

Keep details for assignee changes, so that it would be possible to query
for changes in the assignee field.

Assignee and pastAssignees are removed from ChangeNotesParser as they
are not needed.
Assignee and pastAssignee are also removed from cache as they can be
inferred.

Change-Id: I57cd4a5bd5f5886daee26f42a308f0dad1bd8b8b
This commit is contained in:
Gal Paikin
2019-10-16 15:09:56 +02:00
parent a6ec09622c
commit 2345703a50
9 changed files with 202 additions and 76 deletions

View File

@@ -0,0 +1,21 @@
package com.google.gerrit.server;
import com.google.auto.value.AutoValue;
import com.google.gerrit.entities.Account;
import java.sql.Timestamp;
import java.util.Optional;
/** Change to an assignee's status. */
@AutoValue
public abstract class AssigneeStatusUpdate {
public static AssigneeStatusUpdate create(
Timestamp ts, Account.Id updatedBy, Optional<Account.Id> currentAssignee) {
return new AutoValue_AssigneeStatusUpdate(ts, updatedBy, currentAssignee);
}
public abstract Timestamp date();
public abstract Account.Id updatedBy();
public abstract Optional<Account.Id> currentAssignee();
}