From 468c092fa371b1b4881076a060c1f7ae459a485e Mon Sep 17 00:00:00 2001 From: To-om Date: Fri, 26 Mar 2021 08:47:05 +0100 Subject: [PATCH] #1891 Update caseId in alert when merge to existing case --- thehive/app/org/thp/thehive/services/AlertSrv.scala | 1 + 1 file changed, 1 insertion(+) diff --git a/thehive/app/org/thp/thehive/services/AlertSrv.scala b/thehive/app/org/thp/thehive/services/AlertSrv.scala index e237b30997..c39e6387fd 100644 --- a/thehive/app/org/thp/thehive/services/AlertSrv.scala +++ b/thehive/app/org/thp/thehive/services/AlertSrv.scala @@ -291,6 +291,7 @@ class AlertSrv @Inject() ( _ <- importCustomFields(alert, `case`) _ <- caseSrv.addTags(`case`, alert.tags.toSet) _ <- alertCaseSrv.create(AlertCase(), alert, `case`) + _ <- get(alert).update(_.caseId, Some(`case`._id)).getOrFail("Alert") c <- caseSrv.get(`case`).update(_.description, description).getOrFail("Case") details <- Success( Json.obj(