From 9161277f2303f6fa11bd62be67dda273ad7ccbc3 Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Fri, 3 Jan 2014 15:37:42 -0800 Subject: [PATCH] CRM-13921 - Individual Prefix, Suffix and Gender fields are broken when used on tokens --- CRM/Contact/BAO/Query.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CRM/Contact/BAO/Query.php b/CRM/Contact/BAO/Query.php index ec5af1de6b..f875fcee64 100644 --- a/CRM/Contact/BAO/Query.php +++ b/CRM/Contact/BAO/Query.php @@ -635,6 +635,12 @@ class CRM_Contact_BAO_Query { } } + if (in_array($name, array('prefix_id', 'suffix_id', 'gender_id'))) { + if (CRM_Utils_Array::value($field['pseudoconstant']['optionGroupName'], $this->_returnProperties)) { + $makeException = TRUE; + } + } + $cfID = CRM_Core_BAO_CustomField::getKeyID($name); if ( CRM_Utils_Array::value($name, $this->_paramLookup) || -- 2.25.1