dev/core#578 handle full group by on activity summary.
authoreileen <emcnaughton@wikimedia.org>
Sun, 7 Jul 2019 05:17:19 +0000 (17:17 +1200)
committereileen <emcnaughton@wikimedia.org>
Sun, 7 Jul 2019 05:19:36 +0000 (17:19 +1200)
Dave J did a tonne of work fixing up this report & adding a unit test - this complete by just handling FGB very specifically
on one query

CRM/Report/Form/ActivitySummary.php

index 6e93b7ab3f430cc7b0d2bc891f22123c185c21bf..0ee51f4025200ba96a24d531230de25c379390d1 100644 (file)
@@ -491,7 +491,9 @@ class CRM_Report_Form_ActivitySummary extends CRM_Report_Form {
     // store the result in temporary table
     $insertQuery = "INSERT INTO {$this->_tempDurationSumTableName} (civicrm_activity_duration_total)
     {$sql}";
+    CRM_Core_DAO::disableFullGroupByMode();
     CRM_Core_DAO::executeQuery($insertQuery);
+    CRM_Core_DAO::reenableFullGroupByMode();
 
     $sql = "SELECT {$this->_tempTableName}.*,  {$this->_tempDurationSumTableName}.civicrm_activity_duration_total
     FROM {$this->_tempTableName} INNER JOIN {$this->_tempDurationSumTableName}