From 6e12dd4d782d578ae3007767a83a2ee868454d6a Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Wed, 19 Aug 2015 11:39:51 +0200 Subject: [PATCH] monitoring: Fix service status grouping when selecting group alias columns refs #9956 --- .../Backend/Ido/Query/ServicestatusQuery.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/monitoring/library/Monitoring/Backend/Ido/Query/ServicestatusQuery.php b/modules/monitoring/library/Monitoring/Backend/Ido/Query/ServicestatusQuery.php index 7e716ee1b..a135d8b41 100644 --- a/modules/monitoring/library/Monitoring/Backend/Ido/Query/ServicestatusQuery.php +++ b/modules/monitoring/library/Monitoring/Backend/Ido/Query/ServicestatusQuery.php @@ -374,6 +374,7 @@ class ServicestatusQuery extends IdoQuery $group[] = 'so.object_id'; $group[] = 's.service_id'; $group[] = 'sgo.object_id'; + $group[] = 'sg.servicegroup_id'; $groupedTables['services'] = true; $groupedTables['servicegroups'] = true; } @@ -388,6 +389,7 @@ class ServicestatusQuery extends IdoQuery $groupedTables['services'] = true; } $group[] = 'hgo.object_id'; + $group[] = 'hg.hostgroup_id'; $groupedTables['hostgroups'] = true; } } @@ -404,19 +406,17 @@ class ServicestatusQuery extends IdoQuery } switch ($tableName) { case 'hosts': - $groupColumn = 'h.host_id'; + $group[] = 'h.host_id'; break; case 'hoststatus': - $groupColumn = 'hs.hoststatus_id'; + $group[] = 'hs.hoststatus_id'; break; case 'servicestatus': - $groupColumn = 'ss.servicestatus_id'; + $group[] = 'ss.servicestatus_id'; break; default: continue 2; } - /** @var string $groupColumn */ - $group[] = $groupColumn; $groupedTables[$tableName] = true; } }