From 6cc7af1597ebb01c38796e27cd651b9493f9f392 Mon Sep 17 00:00:00 2001 From: eileen Date: Sun, 7 Jul 2019 17:17:19 +1200 Subject: [PATCH] dev/core#578 handle full group by on activity summary. 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 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CRM/Report/Form/ActivitySummary.php b/CRM/Report/Form/ActivitySummary.php index 6e93b7ab3f..0ee51f4025 100644 --- a/CRM/Report/Form/ActivitySummary.php +++ b/CRM/Report/Form/ActivitySummary.php @@ -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} -- 2.25.1