Merge pull request #6560 from kurund/CRM-16719-fix
[civicrm-core.git] / CRM / Report / Form / Activity.php
index b65daaab49c7f538b65c3c88dfc7a8cdf57ec78c..3ce059f8f52cda43bcbd059b9ab34b73022ff58d 100644 (file)
@@ -226,6 +226,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')),
@@ -694,6 +695,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'