From 2faf598513de993c731ff3e16493e4249631656c Mon Sep 17 00:00:00 2001 From: To-om Date: Wed, 29 Jul 2020 10:06:49 +0200 Subject: [PATCH] #1454 Add tasks in case template output --- dto/src/main/scala/org/thp/thehive/dto/v1/CaseTemplate.scala | 3 ++- thehive/app/org/thp/thehive/controllers/v1/Conversion.scala | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/dto/src/main/scala/org/thp/thehive/dto/v1/CaseTemplate.scala b/dto/src/main/scala/org/thp/thehive/dto/v1/CaseTemplate.scala index f57a63af9e..c43c0496ac 100644 --- a/dto/src/main/scala/org/thp/thehive/dto/v1/CaseTemplate.scala +++ b/dto/src/main/scala/org/thp/thehive/dto/v1/CaseTemplate.scala @@ -42,7 +42,8 @@ case class OutputCaseTemplate( tlp: Option[Int], pap: Option[Int], summary: Option[String], - customFields: Set[OutputCustomFieldValue] = Set.empty + customFields: Set[OutputCustomFieldValue] = Set.empty, + tasks: Seq[OutputTask] ) object OutputCaseTemplate { diff --git a/thehive/app/org/thp/thehive/controllers/v1/Conversion.scala b/thehive/app/org/thp/thehive/controllers/v1/Conversion.scala index 00a48d3ae6..4ec7257c4d 100644 --- a/thehive/app/org/thp/thehive/controllers/v1/Conversion.scala +++ b/thehive/app/org/thp/thehive/controllers/v1/Conversion.scala @@ -145,6 +145,7 @@ object Conversion { .withFieldConst(_._type, "CaseTemplate") .withFieldComputed(_.customFields, _.customFields.map(_.toOutput).toSet) .withFieldComputed(_.tags, _.tags.map(_.toString).toSet) + .withFieldComputed(_.tasks, _.tasks.map(_.toOutput)) .transform )