From 101f8739ca12d2ed11ab8f4024840307af5d66d8 Mon Sep 17 00:00:00 2001 From: yashodha Date: Tue, 4 Jan 2022 09:44:26 +0530 Subject: [PATCH] (dev/core#3012) Expose more options for email on hold as filter for all contribution reports --- CRM/Report/Form/Contribute/History.php | 8 ++++++++ CRM/Report/Form/Contribute/HouseholdSummary.php | 8 ++++++++ CRM/Report/Form/Contribute/OrganizationSummary.php | 8 ++++++++ CRM/Report/Form/Contribute/Repeat.php | 8 ++++++++ CRM/Report/Form/Contribute/Sybunt.php | 8 ++++++++ CRM/Report/Form/Contribute/TopDonor.php | 8 ++++++++ 6 files changed, 48 insertions(+) diff --git a/CRM/Report/Form/Contribute/History.php b/CRM/Report/Form/Contribute/History.php index 57d16211d9..b97f1adb5c 100644 --- a/CRM/Report/Form/Contribute/History.php +++ b/CRM/Report/Form/Contribute/History.php @@ -164,6 +164,14 @@ class CRM_Report_Form_Contribute_History extends CRM_Report_Form { 'no_repeat' => TRUE, ], ], + 'filters' => [ + 'on_hold' => [ + 'title' => ts('On Hold'), + 'type' => CRM_Utils_Type::T_INT, + 'operatorType' => CRM_Report_Form::OP_MULTISELECT, + 'options' => ['' => ts('Any')] + CRM_Core_PseudoConstant::emailOnHoldOptions(), + ], + ], 'grouping' => 'contact-fields', ], 'civicrm_phone' => [ diff --git a/CRM/Report/Form/Contribute/HouseholdSummary.php b/CRM/Report/Form/Contribute/HouseholdSummary.php index 8b814cf209..64537a2c64 100644 --- a/CRM/Report/Form/Contribute/HouseholdSummary.php +++ b/CRM/Report/Form/Contribute/HouseholdSummary.php @@ -183,6 +183,14 @@ class CRM_Report_Form_Contribute_HouseholdSummary extends CRM_Report_Form { 'fields' => [ 'email' => NULL, ], + 'filters' => [ + 'on_hold' => [ + 'title' => ts('On Hold'), + 'type' => CRM_Utils_Type::T_INT, + 'operatorType' => CRM_Report_Form::OP_MULTISELECT, + 'options' => ['' => ts('Any')] + CRM_Core_PseudoConstant::emailOnHoldOptions(), + ], + ], 'grouping' => 'contact-fields', ], ]; diff --git a/CRM/Report/Form/Contribute/OrganizationSummary.php b/CRM/Report/Form/Contribute/OrganizationSummary.php index 48b96aabae..6f030d62f0 100644 --- a/CRM/Report/Form/Contribute/OrganizationSummary.php +++ b/CRM/Report/Form/Contribute/OrganizationSummary.php @@ -168,6 +168,14 @@ class CRM_Report_Form_Contribute_OrganizationSummary extends CRM_Report_Form { 'civicrm_email' => [ 'dao' => 'CRM_Core_DAO_Email', 'fields' => ['email' => NULL], + 'filters' => [ + 'on_hold' => [ + 'title' => ts('On Hold'), + 'type' => CRM_Utils_Type::T_INT, + 'operatorType' => CRM_Report_Form::OP_MULTISELECT, + 'options' => ['' => ts('Any')] + CRM_Core_PseudoConstant::emailOnHoldOptions(), + ], + ], 'grouping' => 'contact-fields', ], 'civicrm_financial_trxn' => [ diff --git a/CRM/Report/Form/Contribute/Repeat.php b/CRM/Report/Form/Contribute/Repeat.php index 79d0e8fc10..54656a0528 100644 --- a/CRM/Report/Form/Contribute/Repeat.php +++ b/CRM/Report/Form/Contribute/Repeat.php @@ -144,6 +144,14 @@ class CRM_Report_Form_Contribute_Repeat extends CRM_Report_Form { 'no_repeat' => TRUE, ), ), + 'filters' => [ + 'on_hold' => [ + 'title' => ts('On Hold'), + 'type' => CRM_Utils_Type::T_INT, + 'operatorType' => CRM_Report_Form::OP_MULTISELECT, + 'options' => ['' => ts('Any')] + CRM_Core_PseudoConstant::emailOnHoldOptions(), + ], + ], 'grouping' => 'contact-fields', ), 'civicrm_phone' => array( diff --git a/CRM/Report/Form/Contribute/Sybunt.php b/CRM/Report/Form/Contribute/Sybunt.php index 5232f325be..6c83f63113 100644 --- a/CRM/Report/Form/Contribute/Sybunt.php +++ b/CRM/Report/Form/Contribute/Sybunt.php @@ -154,6 +154,14 @@ class CRM_Report_Form_Contribute_Sybunt extends CRM_Report_Form { 'default' => TRUE, ], ], + 'filters' => [ + 'on_hold' => [ + 'title' => ts('On Hold'), + 'type' => CRM_Utils_Type::T_INT, + 'operatorType' => CRM_Report_Form::OP_MULTISELECT, + 'options' => ['' => ts('Any')] + CRM_Core_PseudoConstant::emailOnHoldOptions(), + ], + ], ], 'civicrm_phone' => [ 'dao' => 'CRM_Core_DAO_Phone', diff --git a/CRM/Report/Form/Contribute/TopDonor.php b/CRM/Report/Form/Contribute/TopDonor.php index b0c4b769d8..fa40ee3d8b 100644 --- a/CRM/Report/Form/Contribute/TopDonor.php +++ b/CRM/Report/Form/Contribute/TopDonor.php @@ -167,6 +167,14 @@ class CRM_Report_Form_Contribute_TopDonor extends CRM_Report_Form { 'no_repeat' => TRUE, ], ], + 'filters' => [ + 'on_hold' => [ + 'title' => ts('On Hold'), + 'type' => CRM_Utils_Type::T_INT, + 'operatorType' => CRM_Report_Form::OP_MULTISELECT, + 'options' => ['' => ts('Any')] + CRM_Core_PseudoConstant::emailOnHoldOptions(), + ], + ], 'grouping' => 'email-fields', ], 'civicrm_phone' => [ -- 2.25.1