From 1a6c851307bc3802fb9755ed4b0ef179af696261 Mon Sep 17 00:00:00 2001 From: Kurund Jalmi Date: Mon, 17 Aug 2015 07:49:57 +0530 Subject: [PATCH] CRM-16719: added relevent code from #6325 --- CRM/Report/Form/Activity.php | 5 +++++ xml/templates/civicrm_navigation.tpl | 7 ++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/CRM/Report/Form/Activity.php b/CRM/Report/Form/Activity.php index 92c64f9e6b..f35071069f 100644 --- a/CRM/Report/Form/Activity.php +++ b/CRM/Report/Form/Activity.php @@ -228,6 +228,7 @@ class CRM_Report_Form_Activity extends CRM_Report_Form { ), 'filters' => array( 'activity_date_time' => array( + 'default' => 'this.month', 'operatorType' => CRM_Report_Form::OP_DATE, ), 'activity_subject' => array('title' => ts('Activity Subject')), @@ -742,6 +743,10 @@ GROUP BY civicrm_activity_id $having {$this->_orderBy}"; } public function postProcess() { + //reset value of activity_date + if (!empty($this->_force)) { + $this->_formValues["activity_date_time_relative"] = NULL; + } $this->beginPostProcess(); //Assign those recordtype to array which have filter operator as 'Is not empty' or 'Is empty' diff --git a/xml/templates/civicrm_navigation.tpl b/xml/templates/civicrm_navigation.tpl index bddb20669e..338399169f 100644 --- a/xml/templates/civicrm_navigation.tpl +++ b/xml/templates/civicrm_navigation.tpl @@ -695,7 +695,7 @@ VALUES INSERT INTO `civicrm_report_instance` ( `domain_id`, `title`, `report_id`, `description`, `permission`, `form_values`) VALUES - ( @domainID, '{ts escape="sql" skip="true"}Activities{/ts}', 'activity', '{ts escape="sql" skip="true"}Provides a list of constituent activity including activity statistics for one/all contacts during a given date range(required){/ts}', 'administer CiviCRM', '{literal}a:26:{s:6:"fields";a:6:{s:16:"contact_assignee";s:1:"1";s:14:"contact_target";s:1:"1";s:16:"activity_type_id";s:1:"1";s:16:"activity_subject";s:1:"1";s:18:"activity_date_time";s:1:"1";s:9:"status_id";s:1:"1";}s:17:"contact_source_op";s:3:"has";s:20:"contact_source_value";s:0:"";s:19:"contact_assignee_op";s:3:"has";s:22:"contact_assignee_value";s:0:"";s:17:"contact_target_op";s:3:"has";s:20:"contact_target_value";s:0:"";s:15:"current_user_op";s:2:"eq";s:18:"current_user_value";s:1:"0";s:27:"activity_date_time_relative";s:10:"this.month";s:23:"activity_date_time_from";s:0:"";s:21:"activity_date_time_to";s:0:"";s:19:"activity_subject_op";s:3:"has";s:22:"activity_subject_value";s:0:"";s:19:"activity_type_id_op";s:2:"in";s:22:"activity_type_id_value";a:0:{}s:12:"status_id_op";s:2:"in";s:15:"status_id_value";a:0:{}s:11:"description";s:126:"Provides a list of constituent activity including activity statistics for one/all contacts during a given date range(required)";s:13:"email_subject";s:0:"";s:8:"email_to";s:0:"";s:8:"email_cc";s:0:"";s:10:"permission";s:18:"administer CiviCRM";s:6:"groups";s:0:"";s:9:"group_bys";N;s:9:"domain_id";i:1;}{/literal}'); + ( @domainID, '{ts escape="sql" skip="true"}Activity Details{/ts}', 'activity', '{ts escape="sql" skip="true"}Provides a list of constituent activity including activity statistics for one/all contacts during a given date range(required){/ts}', 'administer CiviCRM', '{literal}a:26:{s:6:"fields";a:6:{s:16:"contact_assignee";s:1:"1";s:14:"contact_target";s:1:"1";s:16:"activity_type_id";s:1:"1";s:16:"activity_subject";s:1:"1";s:18:"activity_date_time";s:1:"1";s:9:"status_id";s:1:"1";}s:17:"contact_source_op";s:3:"has";s:20:"contact_source_value";s:0:"";s:19:"contact_assignee_op";s:3:"has";s:22:"contact_assignee_value";s:0:"";s:17:"contact_target_op";s:3:"has";s:20:"contact_target_value";s:0:"";s:15:"current_user_op";s:2:"eq";s:18:"current_user_value";s:1:"0";s:27:"activity_date_time_relative";s:10:"this.month";s:23:"activity_date_time_from";s:0:"";s:21:"activity_date_time_to";s:0:"";s:19:"activity_subject_op";s:3:"has";s:22:"activity_subject_value";s:0:"";s:19:"activity_type_id_op";s:2:"in";s:22:"activity_type_id_value";a:0:{}s:12:"status_id_op";s:2:"in";s:15:"status_id_value";a:0:{}s:11:"description";s:126:"Provides a list of constituent activity including activity statistics for one/all contacts during a given date range(required)";s:13:"email_subject";s:0:"";s:8:"email_to";s:0:"";s:8:"email_cc";s:0:"";s:10:"permission";s:18:"administer CiviCRM";s:6:"groups";s:0:"";s:9:"group_bys";N;s:9:"domain_id";i:1;}{/literal}'); INSERT INTO `civicrm_report_instance` (`domain_id`, `title`, `report_id`, `description`, `permission`, `form_values`) @@ -707,6 +707,11 @@ INSERT INTO `civicrm_report_instance` VALUES ( @domainID, '{ts escape="sql" skip="true"}Relationships{/ts}', 'contact/relationship', '{ts escape="sql" skip="true"}Gives relationship details between two contacts{/ts}', 'administer CiviCRM', '{literal}a:28:{s:6:"fields";a:4:{s:11:"sort_name_a";s:1:"1";s:11:"sort_name_b";s:1:"1";s:9:"label_a_b";s:1:"1";s:9:"label_b_a";s:1:"1";}s:14:"sort_name_a_op";s:3:"has";s:17:"sort_name_a_value";s:0:"";s:14:"sort_name_b_op";s:3:"has";s:17:"sort_name_b_value";s:0:"";s:17:"contact_type_a_op";s:2:"in";s:20:"contact_type_a_value";a:0:{}s:17:"contact_type_b_op";s:2:"in";s:20:"contact_type_b_value";a:0:{}s:12:"is_active_op";s:2:"eq";s:15:"is_active_value";s:0:"";s:23:"relationship_type_id_op";s:2:"eq";s:26:"relationship_type_id_value";s:0:"";s:13:"country_id_op";s:2:"in";s:16:"country_id_value";a:0:{}s:20:"state_province_id_op";s:2:"in";s:23:"state_province_id_value";a:0:{}s:6:"gid_op";s:2:"in";s:9:"gid_value";a:0:{}s:8:"tagid_op";s:2:"in";s:11:"tagid_value";a:0:{}s:11:"description";s:19:"Relationship Report";s:13:"email_subject";s:0:"";s:8:"email_to";s:0:"";s:8:"email_cc";s:0:"";s:10:"permission";s:18:"administer CiviCRM";s:6:"groups";s:0:"";s:9:"domain_id";i:1;}{/literal}'); +INSERT INTO `civicrm_report_instance` + ( `domain_id`, `title`, `report_id`, `description`, `permission`, `form_values`) +VALUES + ( @domainID, '{ts escape="sql" skip="true"}Activity Summary{/ts}', 'activitySummary', '{ts escape="sql" skip="true"}Shows activity statistics by type / date{/ts}', 'administer CiviCRM', '{literal}a:26:{s:6:"fields";a:4:{s:16:"activity_type_id";s:1:"1";s:9:"status_id";s:1:"1";s:8:"duration";s:1:"1";s:2:"id";s:1:"1";}s:12:"sort_name_op";s:3:"has";s:15:"sort_name_value";s:0:"";s:27:"activity_date_time_relative";s:0:"";s:23:"activity_date_time_from";s:0:"";s:21:"activity_date_time_to";s:0:"";s:19:"activity_type_id_op";s:2:"in";s:22:"activity_type_id_value";a:0:{}s:12:"status_id_op";s:2:"in";s:15:"status_id_value";a:0:{}s:14:"priority_id_op";s:2:"in";s:17:"priority_id_value";a:0:{}s:6:"gid_op";s:2:"in";s:9:"gid_value";a:0:{}s:9:"group_bys";a:2:{s:16:"activity_type_id";s:1:"1";s:9:"status_id";s:1:"1";}s:14:"group_bys_freq";a:1:{s:18:"activity_date_time";s:5:"MONTH";}s:9:"order_bys";a:1:{i:1;a:2:{s:6:"column";s:16:"activity_type_id";s:5:"order";s:3:"ASC";}}s:11:"description";s:40:"Shows activity statistics by type / date";s:13:"email_subject";s:0:"";s:8:"email_to";s:0:"";s:8:"email_cc";s:0:"";s:9:"row_count";s:0:"";s:10:"permission";s:18:"administer CiviCRM";s:9:"parent_id";s:0:"";s:6:"groups";s:0:"";s:11:"instance_id";N;}{/literal}'); + -- Contribution reports INSERT INTO `civicrm_report_instance` ( `domain_id`, `title`, `report_id`, `description`, `permission`, `form_values`) -- 2.25.1