From 05b6bcbab2d1d3ebde86883b9babf4fa0df6f3c8 Mon Sep 17 00:00:00 2001 From: yuri Date: Fri, 8 Mar 2019 15:38:12 +0200 Subject: [PATCH] fix campaign opted out count --- application/Espo/Modules/Crm/Services/Campaign.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/application/Espo/Modules/Crm/Services/Campaign.php b/application/Espo/Modules/Crm/Services/Campaign.php index 43e1d73b25..ae1d421de1 100644 --- a/application/Espo/Modules/Crm/Services/Campaign.php +++ b/application/Espo/Modules/Crm/Services/Campaign.php @@ -94,7 +94,7 @@ class Campaign extends \Espo\Services\Record 'campaignId' => $entity->id, 'action' => 'Opted In', 'isTest' => false - ])->groupBy(['parentId', 'parentType'])->count(); + ])->count(); if (!$optedInCount) $optedInCount = null; $entity->set('optedInCount', $optedInCount); @@ -102,7 +102,7 @@ class Campaign extends \Espo\Services\Record 'campaignId' => $entity->id, 'action' => 'Opted Out', 'isTest' => false - ])->groupBy(['parentId', 'parentType'])->count(); + ])->count(); $entity->set('optedOutCount', $optedOutCount); $optedOutPercentage = null;