Skip to content

Commit

Permalink
#12 Add default value for custom fields
Browse files Browse the repository at this point in the history
  • Loading branch information
To-om committed Jul 3, 2017
1 parent 0b8f5b9 commit 6a0ce0c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions thehive-backend/app/models/Case.scala
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,13 @@ trait CaseAttributes { _: AttributeDef ⇒
val flag: A[Boolean] = attribute("flag", F.booleanFmt, "Flag of the case", false)
val tlp: A[Long] = attribute("tlp", F.numberFmt, "TLP level", 2L)
val status: A[CaseStatus.Value] = attribute("status", F.enumFmt(CaseStatus), "Status of the case", CaseStatus.Open)
val metrics: A[JsValue] = attribute("metrics", F.metricsFmt, "List of metrics")
val metrics: A[JsValue] = attribute("metrics", F.metricsFmt, "List of metrics", JsObject(Nil))
val resolutionStatus: A[Option[CaseResolutionStatus.Value]] = optionalAttribute("resolutionStatus", F.enumFmt(CaseResolutionStatus), "Resolution status of the case")
val impactStatus: A[Option[CaseImpactStatus.Value]] = optionalAttribute("impactStatus", F.enumFmt(CaseImpactStatus), "Impact status of the case")
val summary: A[Option[String]] = optionalAttribute("summary", F.textFmt, "Summary of the case, to be provided when closing a case")
val mergeInto: A[Option[String]] = optionalAttribute("mergeInto", F.stringFmt, "Id of the case created by the merge")
val mergeFrom: A[Seq[String]] = multiAttribute("mergeFrom", F.stringFmt, "Id of the cases merged")
val customFields: A[JsValue] = attribute("customFields", F.customFields, "Custom fields")
val customFields: A[JsValue] = attribute("customFields", F.customFields, "Custom fields", JsObject(Nil))
}

@Singleton
Expand Down

0 comments on commit 6a0ce0c

Please sign in to comment.