Use dbAlias to generate where clause for date field in activity report
authorPradeep Nayak <pradpnayak@gmail.com>
Thu, 5 Mar 2020 12:29:27 +0000 (12:29 +0000)
committerPradeep Nayak <pradpnayak@gmail.com>
Thu, 5 Mar 2020 12:29:27 +0000 (12:29 +0000)
CRM/Report/Form/Activity.php
CRM/Report/Form/ActivitySummary.php

index fa43ee5f26f8aaf78720df1951638cdf5556e50f..fdeb79bef57bcb84963d23a34749ddb17d4006d9 100644 (file)
@@ -540,7 +540,7 @@ class CRM_Report_Form_Activity extends CRM_Report_Form {
             $from = CRM_Utils_Array::value("{$fieldName}_from", $this->_params);
             $to = CRM_Utils_Array::value("{$fieldName}_to", $this->_params);
 
-            $clause = $this->dateClause($field['name'], $relative, $from, $to, $field['type']);
+            $clause = $this->dateClause($field['dbAlias'], $relative, $from, $to, $field['type']);
           }
           else {
             $op = CRM_Utils_Array::value("{$fieldName}_op", $this->_params);
index 14b5946642b12ca1112ebed8dc3d2ff359cee366..e607a8b70fb7bf0a6d57a7da4fd9b39ce389d77e 100644 (file)
@@ -368,7 +368,7 @@ class CRM_Report_Form_ActivitySummary extends CRM_Report_Form {
             $from = CRM_Utils_Array::value("{$fieldName}_from", $this->_params);
             $to = CRM_Utils_Array::value("{$fieldName}_to", $this->_params);
 
-            $clause = $this->dateClause($field['name'], $relative, $from, $to, $field['type']);
+            $clause = $this->dateClause($field['dbAlias'], $relative, $from, $to, $field['type']);
           }
           else {
             $op = CRM_Utils_Array::value("{$fieldName}_op", $this->_params);