(dev/core#649) DB error on Find Activities with follow up criteria
authoryashodha <yashodha@cividesk.com>
Tue, 8 Jan 2019 14:34:15 +0000 (20:04 +0530)
committeryashodha <yashodha@cividesk.com>
Tue, 8 Jan 2019 14:34:15 +0000 (20:04 +0530)
CRM/Activity/BAO/Query.php

index 2a5bdcb30b89b28dcb8e72ca8ece68b37cedb499..1bba431fa21e41dd4d2eb6b4382700c500cc2a83 100644 (file)
@@ -335,11 +335,11 @@ class CRM_Activity_BAO_Query {
 
       case 'parent_id':
         if ($value == 1) {
-          $query->_where[$grouping][] = "parent_id.parent_id IS NOT NULL";
+          $query->_where[$grouping][] = "civicrm_activity.parent_id IS NOT NULL";
           $query->_qill[$grouping][] = ts('Activities which have Followup Activities');
         }
         elseif ($value == 2) {
-          $query->_where[$grouping][] = "parent_id.parent_id IS NULL";
+          $query->_where[$grouping][] = "civicrm_activity.parent_id IS NULL";
           $query->_qill[$grouping][] = ts('Activities without Followup Activities');
         }
         break;