Append submitted info to the change REST endpoint.

Add a timestamp indicating when a change was submitted.  This info
only appears when a change has been submitted.

Feature: Issue 3579
Change-Id: I76a50214e367c2c01ef666e46e3ed6fa2d652a50
This commit is contained in:
Khai Do
2016-01-07 14:07:54 -08:00
parent 8dcf701224
commit 96a7caf010
7 changed files with 53 additions and 0 deletions

View File

@@ -78,6 +78,10 @@ public class ChangeInfo extends JavaScriptObject {
return JavaSqlTimestamp_JsonSerializer.parseTimestamp(updatedRaw());
}
public final Timestamp submitted() {
return JavaSqlTimestamp_JsonSerializer.parseTimestamp(submittedRaw());
}
public final String idAbbreviated() {
return new Change.Key(changeId()).abbreviate();
}
@@ -113,6 +117,7 @@ public class ChangeInfo extends JavaScriptObject {
public final native AccountInfo owner() /*-{ return this.owner; }-*/;
private final native String createdRaw() /*-{ return this.created; }-*/;
private final native String updatedRaw() /*-{ return this.updated; }-*/;
private final native String submittedRaw() /*-{ return this.submitted; }-*/;
public final native boolean starred() /*-{ return this.starred ? true : false; }-*/;
public final native boolean reviewed() /*-{ return this.reviewed ? true : false; }-*/;
public final native NativeMap<LabelInfo> allLabels() /*-{ return this.labels; }-*/;