From e354351fac2b49c903bc519c280d420f6de2a618 Mon Sep 17 00:00:00 2001 From: monishdeb Date: Tue, 16 Jul 2013 15:41:53 +0530 Subject: [PATCH] CRM-13024 fixes ---------------------------------------- * CRM-13024: Search Builder dropdowns broken for Groups, State, Country ... http://issues.civicrm.org/jira/browse/CRM-13024 --- CRM/Contact/Form/Search/Builder.php | 8 ++++---- api/v3/utils.php | 3 +++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/CRM/Contact/Form/Search/Builder.php b/CRM/Contact/Form/Search/Builder.php index 950c161396..5690430d27 100644 --- a/CRM/Contact/Form/Search/Builder.php +++ b/CRM/Contact/Form/Search/Builder.php @@ -407,10 +407,10 @@ class CRM_Contact_Form_Search_Builder extends CRM_Contact_Form_Search { // Hack to add options not retrieved by getfields // This list could go on and on, but it would be better to fix getfields $options = array( - 'group' => 'contact', - 'tag' => 'contact', - 'country' => 'contact', - 'state_province' => 'contact', + 'group' => 'group_contact', + 'tag' => 'entity_tag', + 'country' => 'address', + 'state_province' => 'address', 'gender' => 'contact', 'world_region' => 'contact', 'individual_prefix' => 'contact', diff --git a/api/v3/utils.php b/api/v3/utils.php index cd67feb0b8..b29b0713a8 100644 --- a/api/v3/utils.php +++ b/api/v3/utils.php @@ -1633,6 +1633,9 @@ function _civicrm_api3_api_resolve_alias($entity, $fieldName) { 'action' => 'create', )); $meta = $result['values']; + if (!isset($meta[$fieldName]['name']) && isset($meta[$fieldName . '_id'])) { + $fieldName = $fieldName . '_id'; + } if (isset($meta[$fieldName])) { return $meta[$fieldName]['name']; } -- 2.25.1