From 8ff26851912599dcbca2a182c442e488567c5ccc Mon Sep 17 00:00:00 2001 From: larssandergreen Date: Tue, 13 Jun 2023 08:42:02 -0600 Subject: [PATCH] Show manually added Smart Groups on Contact edit --- CRM/Contact/Form/Contact.php | 2 +- CRM/Contact/Form/Edit/TagsAndGroups.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CRM/Contact/Form/Contact.php b/CRM/Contact/Form/Contact.php index e714c484a3..270e2c9ded 100644 --- a/CRM/Contact/Form/Contact.php +++ b/CRM/Contact/Form/Contact.php @@ -956,7 +956,7 @@ class CRM_Contact_Form_Contact extends CRM_Core_Form { } elseif (!empty($params['contact_id']) && ($this->_action & CRM_Core_Action::UPDATE)) { // figure out which all groups are intended to be removed - $contactGroupList = CRM_Contact_BAO_GroupContact::getContactGroup($params['contact_id'], 'Added'); + $contactGroupList = CRM_Contact_BAO_GroupContact::getContactGroup($params['contact_id'], 'Added', NULL, FALSE, TRUE, FALSE, TRUE, NULL, TRUE); if (is_array($contactGroupList)) { foreach ($contactGroupList as $key) { if ((!array_key_exists($key['group_id'], $params['group']) || $params['group'][$key['group_id']] != 1) && empty($key['is_hidden'])) { diff --git a/CRM/Contact/Form/Edit/TagsAndGroups.php b/CRM/Contact/Form/Edit/TagsAndGroups.php index f06a3e55ca..fdc59e7b6e 100644 --- a/CRM/Contact/Form/Edit/TagsAndGroups.php +++ b/CRM/Contact/Form/Edit/TagsAndGroups.php @@ -168,7 +168,7 @@ class CRM_Contact_Form_Edit_TagsAndGroups { $fName = $fieldName; } - $contactGroup = CRM_Contact_BAO_GroupContact::getContactGroup($id, 'Added', NULL, FALSE, TRUE); + $contactGroup = CRM_Contact_BAO_GroupContact::getContactGroup($id, 'Added', NULL, FALSE, TRUE, FALSE, TRUE, NULL, TRUE); if ($contactGroup) { if ($groupElementType == 'select') { $defaults[$fName] = implode(',', CRM_Utils_Array::collect('group_id', $contactGroup)); -- 2.25.1