From 1161ee9f1bc630510989bd4d407d0e3cd5acc3af Mon Sep 17 00:00:00 2001 From: spirit Date: Thu, 22 Sep 2016 23:29:51 +0300 Subject: [PATCH] CRM-19401 - Integer list option custom fields do not render properly in reports - FIXED ---------------------------------------- * CRM-19401: Integer list option custom fields do not render properly in reports https://issues.civicrm.org/jira/browse/CRM-19401 --- CRM/Report/Form.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CRM/Report/Form.php b/CRM/Report/Form.php index 043092cd46..40f63a4642 100644 --- a/CRM/Report/Form.php +++ b/CRM/Report/Form.php @@ -3706,6 +3706,15 @@ ORDER BY cg.weight, cf.weight"; case 'Int': $curFilters[$fieldName]['operatorType'] = CRM_Report_Form::OP_INT; $curFilters[$fieldName]['type'] = CRM_Utils_Type::T_INT; + + // CRM-19401 fix + if ($customDAO->html_type == 'Select') { + $options = CRM_Core_PseudoConstant::get('CRM_Core_BAO_CustomField', 'custom_' . $customDAO->cf_id, array(), 'search'); + if ($options !== FALSE) { + $curFilters[$fieldName]['operatorType'] = CRM_Core_BAO_CustomField::isSerialized($customDAO) ? CRM_Report_Form::OP_MULTISELECT_SEPARATOR : CRM_Report_Form::OP_MULTISELECT; + $curFilters[$fieldName]['options'] = $options; + } + } break; case 'Money': -- 2.25.1