projects
/
civicrm-core.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
29fdcef
)
dev/core#4930 Fix Activity count when contact is assigned multiple roles
author
Mathieu Lu
<mathieu@symbiotic.coop>
Tue, 23 Jan 2024 17:01:35 +0000
(12:01 -0500)
committer
Mathieu Lutfy
<mathieu@bidon.ca>
Tue, 23 Jan 2024 21:16:07 +0000
(16:16 -0500)
CRM/Contact/BAO/Contact.php
patch
|
blob
|
blame
|
history
diff --git
a/CRM/Contact/BAO/Contact.php
b/CRM/Contact/BAO/Contact.php
index 787d18f78474a7bc42f4466cd8b28ac85623c3d5..254d009eae5c9dee69b46eacaea5201c346cfa58 100644
(file)
--- a/
CRM/Contact/BAO/Contact.php
+++ b/
CRM/Contact/BAO/Contact.php
@@
-2633,9
+2633,11
@@
LEFT JOIN civicrm_email ON ( civicrm_contact.id = civicrm_email.contact_id )
case 'activity':
return \Civi\Api4\Activity::get(TRUE)
+ ->selectRowCount()
->addJoin('ActivityContact AS activity_contact', 'INNER')
->addWhere('activity_contact.contact_id', '=', $contactId)
->addWhere('is_test', '=', FALSE)
+ ->addGroupBy('id')
->execute()
->count();