From 9d2dd2e312913c7bf5a5745c4dac7ec3d038e9b4 Mon Sep 17 00:00:00 2001 From: adixon Date: Mon, 14 Aug 2017 13:56:58 -0400 Subject: [PATCH 1/2] CRM-21063 Add date to survey/details report --- CRM/Report/Form/Campaign/SurveyDetails.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/CRM/Report/Form/Campaign/SurveyDetails.php b/CRM/Report/Form/Campaign/SurveyDetails.php index d5c7b58e69f2..64fef2e38925 100644 --- a/CRM/Report/Form/Campaign/SurveyDetails.php +++ b/CRM/Report/Form/Campaign/SurveyDetails.php @@ -182,6 +182,11 @@ public function __construct() { 'required' => TRUE, 'title' => ts('Survey Result'), ), + 'activity_date_time' => array( + 'name' => 'activity_date_time', + 'title' => ts('Date'), + 'type' => CRM_Utils_Type::T_DATE, + ), ), 'filters' => array( 'survey_id' => array( @@ -204,8 +209,18 @@ public function __construct() { 'operatorType' => CRM_Report_Form::OP_MULTISELECT, 'options' => $resultOptions, ), + 'activity_date_time' => array( + 'title' => ts('Date'), + 'type' => CRM_Utils_Type::T_DATE, + 'operatorType' => CRM_Report_Form::OP_DATE, + ), ), 'grouping' => 'survey-activity-fields', + 'order_bys' => array( + 'activity_date_time' => array( + 'title' => ts('Date'), + ), + ), ), ) + $this->getAddressColumns(); parent::__construct(); From f049f621764b0981898a723945c27ce81e7ab9fe Mon Sep 17 00:00:00 2001 From: adixon Date: Wed, 23 Aug 2017 17:02:39 -0400 Subject: [PATCH 2/2] CRM-21063 add time to type, thanks @MegaphoneJon --- CRM/Report/Form/Campaign/SurveyDetails.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CRM/Report/Form/Campaign/SurveyDetails.php b/CRM/Report/Form/Campaign/SurveyDetails.php index 64fef2e38925..95d7fbd0c78d 100644 --- a/CRM/Report/Form/Campaign/SurveyDetails.php +++ b/CRM/Report/Form/Campaign/SurveyDetails.php @@ -185,7 +185,7 @@ public function __construct() { 'activity_date_time' => array( 'name' => 'activity_date_time', 'title' => ts('Date'), - 'type' => CRM_Utils_Type::T_DATE, + 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME, ), ), 'filters' => array( @@ -211,7 +211,7 @@ public function __construct() { ), 'activity_date_time' => array( 'title' => ts('Date'), - 'type' => CRM_Utils_Type::T_DATE, + 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME, 'operatorType' => CRM_Report_Form::OP_DATE, ), ),