Merge "Output patchset creation date for 'query' command."

This commit is contained in:
Martin Fick
2011-08-02 13:22:05 -07:00
committed by Android Code Review
3 changed files with 4 additions and 1 deletions

View File

@@ -174,6 +174,7 @@ public class EventFactory {
p.number = Integer.toString(patchSet.getPatchSetId()); p.number = Integer.toString(patchSet.getPatchSetId());
p.ref = patchSet.getRefName(); p.ref = patchSet.getRefName();
p.uploader = asAccountAttribute(patchSet.getUploader()); p.uploader = asAccountAttribute(patchSet.getUploader());
p.createdOn = patchSet.getCreatedOn().getTime() / 1000L;
return p; return p;
} }

View File

@@ -21,6 +21,7 @@ public class PatchSetAttribute {
public String revision; public String revision;
public String ref; public String ref;
public AccountAttribute uploader; public AccountAttribute uploader;
public Long createdOn;
public List<ApprovalAttribute> approvals; public List<ApprovalAttribute> approvals;
public List<PatchSetCommentAttribute> comments; public List<PatchSetCommentAttribute> comments;

View File

@@ -345,7 +345,8 @@ public class QueryProcessor {
private static boolean isDateField(String name) { private static boolean isDateField(String name) {
return "lastUpdated".equals(name) // return "lastUpdated".equals(name) //
|| "grantedOn".equals(name) // || "grantedOn".equals(name) //
|| "timestamp".equals(name); || "timestamp".equals(name) //
|| "createdOn".equals(name);
} }
private List<Field> fieldsOf(Class<?> type) { private List<Field> fieldsOf(Class<?> type) {