Add topic, lastUpdated, sortKey to ChangeAttribute
Some of these are really meant for the query results more than for the streaming event system, but its still good to dump out the topic in either case. Change-Id: I47e59458b22647210090d9ec3190eaf71c067f6e Signed-off-by: Shawn O. Pearce <sop@google.com>
This commit is contained in:
@@ -17,9 +17,12 @@ package com.google.gerrit.server.events;
|
||||
public class ChangeAttribute {
|
||||
public String project;
|
||||
public String branch;
|
||||
public String topic;
|
||||
public String id;
|
||||
public String number;
|
||||
public String subject;
|
||||
public AccountAttribute owner;
|
||||
public String url;
|
||||
public long lastUpdated;
|
||||
public String sortKey;
|
||||
}
|
||||
|
||||
@@ -48,10 +48,13 @@ public class EventFactory {
|
||||
ChangeAttribute a = new ChangeAttribute();
|
||||
a.project = change.getProject().get();
|
||||
a.branch = change.getDest().getShortName();
|
||||
a.topic = change.getTopic();
|
||||
a.id = change.getKey().get();
|
||||
a.number = change.getId().toString();
|
||||
a.subject = change.getSubject();
|
||||
a.url = getChangeUrl(change);
|
||||
a.lastUpdated = change.getLastUpdatedOn().getTime() / 1000L;
|
||||
a.sortKey = change.getSortKey();
|
||||
|
||||
final AccountState owner = accountCache.get(change.getOwner());
|
||||
a.owner = asAccountAttribute(owner.getAccount());
|
||||
|
||||
Reference in New Issue
Block a user