From 0e80e3895be8b218cdfac4c6d1916bd21cfe341a Mon Sep 17 00:00:00 2001 From: mmyriam <32363067+mmyriam@users.noreply.github.com> Date: Wed, 4 Sep 2019 09:43:42 -0400 Subject: [PATCH] Fix search for case tags that are part of tag sets Changes to be committed: modified: CRM/Case/BAO/Query.php --- CRM/Case/BAO/Query.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/CRM/Case/BAO/Query.php b/CRM/Case/BAO/Query.php index 321118bf96..3db0adee60 100644 --- a/CRM/Case/BAO/Query.php +++ b/CRM/Case/BAO/Query.php @@ -481,7 +481,14 @@ class CRM_Case_BAO_Query extends CRM_Core_BAO_Query { $tags = CRM_Core_PseudoConstant::get('CRM_Core_DAO_EntityTag', 'tag_id', ['onlyActive' => FALSE]); if (!empty($value)) { - $val = explode(',', $value); + if (is_array($value)) { + // Search tag(s) are part of a tag set + $val = array_keys($value); + } + else { + // Search tag(s) are part of the tag tree + $val = explode(',', $value); + } foreach ($val as $v) { if ($v) { $names[] = $tags[$v]; -- 2.25.1