CRM-15279 : fix query for survey while finding activities
authorCiviCRM <info@civicrm.org>
Fri, 12 Sep 2014 05:20:34 +0000 (10:50 +0530)
committerCiviCRM <info@civicrm.org>
Fri, 12 Sep 2014 05:20:34 +0000 (10:50 +0530)
CRM/Activity/BAO/Query.php

index 5a53b144c7ca51def7b7c039638db132358aebff..0fa38fe4ab53281e281b042e4bfbbf1ff4b52f5c 100644 (file)
@@ -220,7 +220,7 @@ class CRM_Activity_BAO_Query {
           break;
         }
         $value = CRM_Utils_Type::escape($value, 'Integer');
-        $query->_where[$grouping][] = " source_record_id = $value";
+        $query->_where[$grouping][] = " civicrm_activity.source_record_id = $value";
         $query->_qill[$grouping][] = ts('Survey') . ' - ' . CRM_Core_DAO::getFieldValue('CRM_Campaign_DAO_Survey', $value, 'title');
         break;