From 8e4785fa3b38539eb4d1cb4d6cb2440a51581f4b Mon Sep 17 00:00:00 2001 From: jitendrapurohit Date: Wed, 25 Jan 2017 15:04:37 +0530 Subject: [PATCH] CRM-19926: Include child groups when filtered with parent group --- CRM/Report/Form.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CRM/Report/Form.php b/CRM/Report/Form.php index afb8857a44..5e1812e5f9 100644 --- a/CRM/Report/Form.php +++ b/CRM/Report/Form.php @@ -3433,6 +3433,9 @@ WHERE cg.extends IN ('" . implode("','", $this->_customGroupExtends) . "') AND if (!is_array($value)) { $value = array($value); } + //include child groups if any + $value = array_merge($value, CRM_Contact_BAO_Group::getChildGroupIds($value)); + $clause = "{$field['dbAlias']} IN (" . implode(', ', $value) . ")"; $contactAlias = $this->_aliases['civicrm_contact']; -- 2.25.1