From 49c0cfdbcfb6840027a4cc15c1057089132ed103 Mon Sep 17 00:00:00 2001 From: ahmedg1986 Date: Tue, 16 Jan 2018 07:17:34 +0530 Subject: [PATCH] CRM-15049: Fixed include/exclude search for parent groups (#10546) * CRM-15049: Fixed include/exclude search for parent groups * Fixed the style errors * CRM-15049: update comment --- CRM/Contact/Form/Search/Custom/Group.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CRM/Contact/Form/Search/Custom/Group.php b/CRM/Contact/Form/Search/Custom/Group.php index 9637fb6066..3c28ac5482 100644 --- a/CRM/Contact/Form/Search/Custom/Group.php +++ b/CRM/Contact/Form/Search/Custom/Group.php @@ -260,6 +260,12 @@ class CRM_Contact_Form_Search_Custom_Group extends CRM_Contact_Form_Search_Custo } $includedGroups = implode(',', $allGroups); + //CRM-15049 - Include child group ids. + $childGroupIds = CRM_Contact_BAO_Group::getChildGroupIds($this->_includeGroups); + if (count($childGroupIds) > 0) { + $this->_includeGroups = array_merge($this->_includeGroups, $childGroupIds); + } + if (!empty($this->_includeGroups)) { $iGroups = implode(',', $this->_includeGroups); } -- 2.25.1