aboutsummaryrefslogtreecommitdiff
path: root/src/main/scala/xyz/driver/pdsuidomain/formats/json/document/ApiPartialDocument.scala
diff options
context:
space:
mode:
authorKseniya Tomskikh <ktomskih@datamonsters.co>2017-10-12 11:43:17 +0700
committerGitHub <noreply@github.com>2017-10-12 11:43:17 +0700
commit713897ff6023ec20538f098b09e5770428538ea8 (patch)
tree4c45f8287b10e6ceb0b3dc65d3828038c0b060a5 /src/main/scala/xyz/driver/pdsuidomain/formats/json/document/ApiPartialDocument.scala
parente15415d69ec990d5243e58704e232e619b80aa6f (diff)
parent69e3209c00484c39440bff4e234e29f589d963cf (diff)
downloadrest-query-3f01b9fcc7c664119df98ee1cc4ce16a256e08ad.tar.gz
rest-query-3f01b9fcc7c664119df98ee1cc4ce16a256e08ad.tar.bz2
rest-query-3f01b9fcc7c664119df98ee1cc4ce16a256e08ad.zip
Merge pull request #44 from drivergroup/PDSUI-1088v0.8.4
PDSUI-1088 Added labelVersion to documents
Diffstat (limited to 'src/main/scala/xyz/driver/pdsuidomain/formats/json/document/ApiPartialDocument.scala')
-rw-r--r--src/main/scala/xyz/driver/pdsuidomain/formats/json/document/ApiPartialDocument.scala6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/main/scala/xyz/driver/pdsuidomain/formats/json/document/ApiPartialDocument.scala b/src/main/scala/xyz/driver/pdsuidomain/formats/json/document/ApiPartialDocument.scala
index 032ddf6..ecbdaed 100644
--- a/src/main/scala/xyz/driver/pdsuidomain/formats/json/document/ApiPartialDocument.scala
+++ b/src/main/scala/xyz/driver/pdsuidomain/formats/json/document/ApiPartialDocument.scala
@@ -47,7 +47,8 @@ final case class ApiPartialDocument(recordId: Option[Long],
meta = meta.cata(x => Some(TextJson(JsonSerializer.deserialize[Meta](x))), None, orig.meta),
startDate = startDate.cata(Some(_), None, orig.startDate),
endDate = endDate.cata(Some(_), None, orig.endDate),
- lastUpdate = LocalDateTime.MIN // Should update internally in a business logic module
+ lastUpdate = LocalDateTime.MIN, // Should update internally in a business logic module,
+ labelVersion = orig.labelVersion
)
def toDomain: Try[Document] = Try {
@@ -75,7 +76,8 @@ final case class ApiPartialDocument(recordId: Option[Long],
assignee = None,
previousAssignee = None,
lastActiveUserId = None,
- lastUpdate = LocalDateTime.MIN
+ lastUpdate = LocalDateTime.MIN,
+ labelVersion = 0
)
} else {
throw new JsonValidationException(validationErrors)