From d601762e55a7b5a8660b099c4a894489dcb12093 Mon Sep 17 00:00:00 2001 From: colemanw Date: Tue, 14 Nov 2023 20:10:38 -0500 Subject: [PATCH] dev/core#4740 - Fix missing tagsets when label doesn't match name CRM_Core_Form_Tag::buildQuickForm was previously being passed an array of [id => name] but it was wastefully ignoring the passed ids and looking it up from the name. Now due to bcf668d is being passed an array of [id => label] which is all it needs, just had to remove the wasteful id lookup when it's already there. --- CRM/Core/Form/Tag.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/CRM/Core/Form/Tag.php b/CRM/Core/Form/Tag.php index 0d55661b3c..fe9c14605b 100644 --- a/CRM/Core/Form/Tag.php +++ b/CRM/Core/Form/Tag.php @@ -46,10 +46,7 @@ class CRM_Core_Form_Tag { $form->assign('isTagset', FALSE); $mode = NULL; - foreach ($parentNames as &$parentNameItem) { - // get the parent id for tag list input for keyword - $parentId = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_Tag', $parentNameItem, 'id', 'name'); - + foreach ($parentNames as $parentId => $parentNameItem) { // check if parent exists if ($parentId) { $tagsetItem = $tagsetElementName . 'parentId_' . $parentId; -- 2.25.1