CRM-18975 - Activity date filter ignored when viewing activity reports
authorjitendrapurohit <jitendra.purohit@webaccessglobal.com>
Tue, 21 Jun 2016 10:46:05 +0000 (16:16 +0530)
committerjitendrapurohit <jitendra.purohit@webaccessglobal.com>
Tue, 21 Jun 2016 10:46:05 +0000 (16:16 +0530)
CRM/Report/Form/Activity.php
CRM/Report/Form/ActivitySummary.php

index 67c4269f71967403084c2ad767029d51d7697f2b..24814b2354934e2baad45221af8f1a7bfea65798 100644 (file)
@@ -46,6 +46,8 @@ class CRM_Report_Form_Activity extends CRM_Report_Form {
     // There could be multiple contacts. We not clear on which contact id to display.
     // Lets hide it for now.
     $this->_exposeContactID = FALSE;
+    // if navigated from count link of activity summary reports.
+    $this->_resetDateFilter = CRM_Utils_Request::retrieve('resetDateFilter', 'Boolean', CRM_Core_DAO::$_nullObject);
 
     $config = CRM_Core_Config::singleton();
     $campaignEnabled = in_array("CiviCampaign", $config->enableComponents);
@@ -745,7 +747,7 @@ GROUP BY civicrm_activity_id $having {$this->_orderBy}";
 
   public function postProcess() {
     //reset value of activity_date
-    if (!empty($this->_force)) {
+    if (!empty($this->_resetDateFilter)) {
       $this->_formValues["activity_date_time_relative"] = NULL;
     }
     $this->beginPostProcess();
index 2f2a7c00773738b9b64c9a6060cf34dc2bdc1291..b25165548d178501a26c0f54f63995ceb2fb96f9 100644 (file)
@@ -672,6 +672,8 @@ class CRM_Report_Form_ActivitySummary extends CRM_Report_Form {
             break;
           }
         }
+        // reset date filter on activity reports.
+        $url[] = "resetDateFilter=1";
         $url = implode('&', $url);
         $url = CRM_Report_Utils_Report::getNextUrl('activity', "reset=1&force=1&{$url}",
                  $this->_absoluteUrl,