From a561af928a52c078f7788aaaa88f05e586830085 Mon Sep 17 00:00:00 2001 From: To-om Date: Thu, 9 Jul 2020 10:47:12 +0200 Subject: [PATCH] #1427 Include ioc stats in observable stats in alert similarities --- thehive/app/org/thp/thehive/controllers/v0/AlertCtrl.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/thehive/app/org/thp/thehive/controllers/v0/AlertCtrl.scala b/thehive/app/org/thp/thehive/controllers/v0/AlertCtrl.scala index 60da7148f1..6ef6a51c59 100644 --- a/thehive/app/org/thp/thehive/controllers/v0/AlertCtrl.scala +++ b/thehive/app/org/thp/thehive/controllers/v0/AlertCtrl.scala @@ -144,7 +144,7 @@ class AlertCtrl @Inject() ( .into[OutputSimilarCase] .withFieldConst(_.artifactCount, observableCount.getOrDefault(false, 0L).toInt) .withFieldConst(_.iocCount, observableCount.getOrDefault(true, 0L).toInt) - .withFieldConst(_.similarArtifactCount, iocStats.getOrElse(false, 0)) + .withFieldConst(_.similarArtifactCount, iocStats.values.sum) .withFieldConst(_.similarIOCCount, iocStats.getOrElse(true, 0)) .withFieldConst(_.resolutionStatus, atMostOneOf[String](resolutionStatus)) .withFieldComputed(_.status, _.status.toString)