From 697279244786fa5405e023d332c5cbce8d12502c Mon Sep 17 00:00:00 2001 From: Pradeep Nayak Date: Fri, 11 Nov 2016 18:34:34 +0530 Subject: [PATCH] CRM-19636, fixed db error for Top Donor report when filtered using Contact Name, Contact sub type, Contact type etc ---------------------------------------- * CRM-19636: DB error on Top Donor Report https://issues.civicrm.org/jira/browse/CRM-19636 --- CRM/Report/Form/Contribute/TopDonor.php | 43 ++++++++----------------- 1 file changed, 14 insertions(+), 29 deletions(-) diff --git a/CRM/Report/Form/Contribute/TopDonor.php b/CRM/Report/Form/Contribute/TopDonor.php index ff22f62f1f..077a45b896 100644 --- a/CRM/Report/Form/Contribute/TopDonor.php +++ b/CRM/Report/Form/Contribute/TopDonor.php @@ -106,6 +106,20 @@ class CRM_Report_Form_Contribute_TopDonor extends CRM_Report_Form { ), ), 'filters' => array( + 'sort_name' => array( + 'title' => ts('Contact Name'), + 'type' => CRM_Utils_Type::T_STRING, + 'operator' => 'like', + ), + 'id' => array( + 'title' => ts('Contact ID'), + 'type' => CRM_Utils_Type::T_INT, + 'no_display' => TRUE, + ), + 'birth_date' => array( + 'title' => ts('Birth Date'), + 'operatorType' => CRM_Report_Form::OP_DATE, + ), 'gender_id' => array( 'title' => ts('Gender'), 'operatorType' => CRM_Report_Form::OP_MULTISELECT, @@ -118,13 +132,6 @@ class CRM_Report_Form_Contribute_TopDonor extends CRM_Report_Form { 'title' => ts('Contact Subtype'), ), ), - 'filters' => array( - 'gender_id' => array( - 'title' => ts('Gender'), - 'operatorType' => CRM_Report_Form::OP_MULTISELECT, - 'options' => CRM_Core_PseudoConstant::get('CRM_Contact_DAO_Contact', 'gender_id'), - ), - ), ), 'civicrm_line_item' => array( 'dao' => 'CRM_Price_DAO_LineItem', @@ -150,28 +157,6 @@ class CRM_Report_Form_Contribute_TopDonor extends CRM_Report_Form { ), ), 'filters' => array( - 'sort_name' => array( - 'title' => ts('Participant Name'), - 'type' => CRM_Utils_Type::T_STRING, - 'operator' => 'like', - ), - 'id' => array( - 'title' => ts('Contact ID'), - 'type' => CRM_Utils_Type::T_INT, - 'no_display' => TRUE, - ), - 'birth_date' => array( - 'title' => ts('Birth Date'), - 'operatorType' => CRM_Report_Form::OP_DATE, - ), - 'contact_type' => array( - 'title' => ts('Contact Type'), - 'type' => CRM_Utils_Type::T_STRING, - ), - 'contact_sub_type' => array( - 'title' => ts('Contact Subtype'), - 'type' => CRM_Utils_Type::T_STRING, - ), 'receive_date' => array( 'default' => 'this.year', 'operatorType' => CRM_Report_Form::OP_DATE, -- 2.25.1