From a2323084642446a8198438d12691f3f59e8e528e Mon Sep 17 00:00:00 2001 From: Brian Shaughnessy Date: Sat, 1 Apr 2017 13:22:48 -0400 Subject: [PATCH] CRM-20368 time spent report --- CRM/Report/Form/Case/TimeSpent.php | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/CRM/Report/Form/Case/TimeSpent.php b/CRM/Report/Form/Case/TimeSpent.php index 2b242271f3..6ad89dc016 100644 --- a/CRM/Report/Form/Case/TimeSpent.php +++ b/CRM/Report/Form/Case/TimeSpent.php @@ -63,6 +63,12 @@ class CRM_Report_Form_Case_TimeSpent extends CRM_Report_Form { 'type' => CRM_Report_Form::OP_STRING, ), ), + 'order_bys' => array( + 'sort_name' => array( + 'title' => ts('Contact Name'), + 'default_weight' => '1', + ), + ), ), 'civicrm_activity' => array( 'dao' => 'CRM_Activity_DAO_Activity', @@ -116,6 +122,21 @@ class CRM_Report_Form_Case_TimeSpent extends CRM_Report_Form { 'options' => $this->activityStatuses, ), ), + 'order_bys' => array( + 'subject' => array( + 'title' => ts('Activity Subject'), + ), + 'activity_type_id' => array( + 'title' => ts('Activity Type'), + ), + 'activity_date_time' => array( + 'title' => ts('Activity Date'), + ), + 'status_id' => array( + 'title' => ts('Activity Status'), + ), + ), + 'grouping' => 'case-fields', ), 'civicrm_activity_source' => array( 'dao' => 'CRM_Activity_DAO_ActivityContact', @@ -295,10 +316,6 @@ class CRM_Report_Form_Case_TimeSpent extends CRM_Report_Form { } } - public function orderBy() { - $this->_orderBy = "ORDER BY {$this->_aliases['civicrm_contact']}.sort_name, {$this->_aliases['civicrm_contact']}.id"; - } - public function postProcess() { parent::postProcess(); } -- 2.25.1