From: giovannidalmas1967 <44569254+giovannidalmas1967@users.noreply.github.com> Date: Mon, 29 Oct 2018 15:39:53 +0000 (+0100) Subject: Update Form.php X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=5d0e2791644eea75ae6f1b88e37a5c6310261174;p=civicrm-core.git Update Form.php Custom fields with data type 'String' cannot be displayed in Reports->Contacts->Contituent Summary->Summery Fields->Filters Tab. This should be related to function addCustomDataToColumns(). Putting a different control for variable '$option' in case 'String' seems to solve the issue --- diff --git a/CRM/Report/Form.php b/CRM/Report/Form.php index 325eb064a4..463afe59b8 100644 --- a/CRM/Report/Form.php +++ b/CRM/Report/Form.php @@ -3935,7 +3935,7 @@ ORDER BY cg.weight, cf.weight"; $curFilters[$fieldName]['type'] = CRM_Utils_Type::T_STRING; $options = CRM_Core_PseudoConstant::get('CRM_Core_BAO_CustomField', 'custom_' . $customDAO->cf_id, array(), 'search'); - if ($options !== FALSE) { + if ((is_array($options) && count($options)!=0) || (!is_array($options) && $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; }