diff --git a/thehive/app/org/thp/thehive/controllers/v0/AlertCtrl.scala b/thehive/app/org/thp/thehive/controllers/v0/AlertCtrl.scala index 6ef6a51c59..aeb9161c02 100644 --- a/thehive/app/org/thp/thehive/controllers/v0/AlertCtrl.scala +++ b/thehive/app/org/thp/thehive/controllers/v0/AlertCtrl.scala @@ -142,7 +142,7 @@ class AlertCtrl @Inject() ( val similarCase = case0 .asInstanceOf[Case] .into[OutputSimilarCase] - .withFieldConst(_.artifactCount, observableCount.getOrDefault(false, 0L).toInt) + .withFieldConst(_.artifactCount, observableCount.asScala.values.map(_.toLong).sum) .withFieldConst(_.iocCount, observableCount.getOrDefault(true, 0L).toInt) .withFieldConst(_.similarArtifactCount, iocStats.values.sum) .withFieldConst(_.similarIOCCount, iocStats.getOrElse(true, 0))