From 493ee124b661311bdcd5e8126e39c4210542ffe7 Mon Sep 17 00:00:00 2001 From: Kurund Jalmi Date: Mon, 17 Aug 2015 10:26:57 +0530 Subject: [PATCH] CRM-16719: result count and duration fixes --- CRM/Report/Form/ActivitySummary.php | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/CRM/Report/Form/ActivitySummary.php b/CRM/Report/Form/ActivitySummary.php index 8fdfab9a8f..dd9caf11ab 100644 --- a/CRM/Report/Form/ActivitySummary.php +++ b/CRM/Report/Form/ActivitySummary.php @@ -112,9 +112,6 @@ class CRM_Report_Form_ActivitySummary extends CRM_Report_Form { 'duration' => array( 'title' => 'Duration', 'default' => TRUE, - 'statistics' => array( - 'sum' => ts('Duration'), - ), ), 'id' => array( 'title' => 'Total Activities', @@ -250,13 +247,6 @@ class CRM_Report_Form_ActivitySummary extends CRM_Report_Form { $this->_columnHeaders["{$tableName}_{$fieldName}_{$stat}"]['title'] = $label; $this->_statFields[] = "{$tableName}_{$fieldName}_{$stat}"; break; - - case 'sum': - $select[] = "SUM({$field['dbAlias']}) as {$tableName}_{$fieldName}_{$stat}"; - $this->_columnHeaders["{$tableName}_{$fieldName}_{$stat}"]['type'] = CRM_Utils_Type::T_INT; - $this->_columnHeaders["{$tableName}_{$fieldName}_{$stat}"]['title'] = $label; - $this->_statFields[] = "{$tableName}_{$fieldName}_{$stat}"; - break; } } } @@ -388,9 +378,8 @@ class CRM_Report_Form_ActivitySummary extends CRM_Report_Form { public function groupBy() { $this->_groupBy = array(); - if (is_array($this->_params['group_bys']) && - !empty($this->_params['group_bys']) - ) { + if (!empty($this->_params['group_bys'] && + is_array($this->_params['group_bys']))) { foreach ($this->_columns as $tableName => $table) { if (array_key_exists('group_bys', $table)) { foreach ($table['group_bys'] as $fieldName => $field) { -- 2.25.1