Skip to content
Snippets Groups Projects
Unverified Commit 38abfd3c authored by colemanw's avatar colemanw Committed by GitHub
Browse files

Merge pull request #31832 from colemanw/fixContactSubtypeTabs-5.81

#5690 - Fix subtype filtering on contact summary custom field…
parents 6bfbc916 34408e08
Branches
Tags
No related merge requests found
......@@ -422,6 +422,15 @@ class CRM_Contact_Page_View_Summary extends CRM_Contact_Page_View {
'extends' => $this->get('contactType'),
'style' => ['Tab', 'Tab with table'],
];
$subTypes = CRM_Utils_Array::explodePadded($this->get('contactSubtype'));
if ($subTypes) {
// Include groups for this subtype OR groups with no subtype
$subTypes[] = NULL;
$filters['extends_entity_column_value'] = $subTypes;
}
else {
$filters['extends_entity_column_value'] = NULL;
}
$activeGroups = CRM_Core_BAO_CustomGroup::getAll($filters, CRM_Core_Permission::VIEW);
foreach ($activeGroups as $group) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment