diff --git a/modules/monitoring/library/Monitoring/Backend/Ido/Query/GroupsummaryQuery.php b/modules/monitoring/library/Monitoring/Backend/Ido/Query/GroupsummaryQuery.php index 62447c7d6..14320567f 100644 --- a/modules/monitoring/library/Monitoring/Backend/Ido/Query/GroupsummaryQuery.php +++ b/modules/monitoring/library/Monitoring/Backend/Ido/Query/GroupsummaryQuery.php @@ -100,16 +100,8 @@ class GroupSummaryQuery extends IdoQuery 'severity' => 'service_severity' ) ); - - $groupColumn = 'hostgroup'; - - if (in_array('servicegroup', $this->desiredColumns)) { - $groupColumn = 'servicegroup'; - } - $union = $this->db->select()->union(array($hosts, $services), Zend_Db_Select::SQL_UNION_ALL); - $this->select->from(array('statussummary' => $union), array())->group(array($groupColumn)); - + $this->select->from(array('statussummary' => $union), array())->group(array($columns[0])); $this->joinedVirtualTables = array( 'servicestatussummary' => true, 'hoststatussummary' => true