From: jitendrapurohit Date: Wed, 25 Jan 2017 09:34:37 +0000 (+0530) Subject: CRM-19926: Include child groups when filtered with parent group X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=8e4785fa3b38539eb4d1cb4d6cb2440a51581f4b;p=civicrm-core.git CRM-19926: Include child groups when filtered with parent group --- 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'];