From 576922b42ab6fbb3dd9b7f6f8fc6bce526427521 Mon Sep 17 00:00:00 2001 From: Brian Shaughnessy Date: Sat, 1 Apr 2017 13:48:36 -0400 Subject: [PATCH] CRM-20368 mailing summary report --- CRM/Report/Form/Mailing/Summary.php | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/CRM/Report/Form/Mailing/Summary.php b/CRM/Report/Form/Mailing/Summary.php index 5b2fdd4382..5795f18672 100644 --- a/CRM/Report/Form/Mailing/Summary.php +++ b/CRM/Report/Form/Mailing/Summary.php @@ -94,6 +94,16 @@ class CRM_Report_Form_Mailing_Summary extends CRM_Report_Form { 'operator' => 'like', ), ), + 'order_bys' => array( + 'mailing_name' => array( + 'name' => 'name', + 'title' => ts('Mailing Name'), + ), + 'mailing_subject' => array( + 'name' => 'subject', + 'title' => ts('Mailing Subject'), + ), + ), ); $this->_columns['civicrm_mailing_job'] = array( @@ -130,6 +140,17 @@ class CRM_Report_Form_Mailing_Summary extends CRM_Report_Form { 'type' => CRM_Utils_Type::T_DATE, ), ), + 'order_bys' => array( + 'start_date' => array( + 'title' => ts('Start Date'), + ), + 'end_date' => array( + 'title' => ts('End Date'), + 'default_weight' => '1', + 'default_order' => 'DESC', + ), + ), + 'grouping' => 'mailing-fields' ); $this->_columns['civicrm_mailing_event_queue'] = array( @@ -462,10 +483,6 @@ class CRM_Report_Form_Mailing_Summary extends CRM_Report_Form { $this->_groupBy = CRM_Contact_BAO_Query::getGroupByFromSelectColumns($this->_selectClauses, $groupBy); } - public function orderBy() { - $this->_orderBy = " ORDER BY {$this->_aliases['civicrm_mailing_job']}.end_date DESC "; - } - public function postProcess() { $this->beginPostProcess(); -- 2.25.1