public List<Change> changes;\r
\r
public IssueModel() {\r
- created = new Date((System.currentTimeMillis() / 1000) * 1000);\r
+ // the first applied change set the date appropriately\r
+ created = new Date(0);\r
\r
type = Type.Defect;\r
status = Status.New;\r
}\r
\r
public void applyChange(Change change) {\r
+ if (changes.size() == 0) {\r
+ // first change created the issue\r
+ created = change.created;\r
+ }\r
changes.add(change);\r
\r
if (change.hasFieldChanges()) {\r
JsonDeserializationContext jsonDeserializationContext) {\r
try {\r
synchronized (dateFormat) {\r
- return dateFormat.parse(jsonElement.getAsString());\r
+ Date date = dateFormat.parse(jsonElement.getAsString()); \r
+ return new Date((date.getTime() / 1000) * 1000);\r
}\r
} catch (ParseException e) {\r
throw new JsonSyntaxException(jsonElement.getAsString(), e);\r