summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Flag.pm
diff options
context:
space:
mode:
Diffstat (limited to 'Bugzilla/Flag.pm')
-rw-r--r--Bugzilla/Flag.pm7
1 files changed, 5 insertions, 2 deletions
diff --git a/Bugzilla/Flag.pm b/Bugzilla/Flag.pm
index ea60eebe4..7245edbfa 100644
--- a/Bugzilla/Flag.pm
+++ b/Bugzilla/Flag.pm
@@ -567,6 +567,8 @@ sub GetBug {
# Returns a hash of information about a target bug.
my ($id) = @_;
+ my $dbh = Bugzilla->dbh;
+
# Save the currently running query (if any) so we do not overwrite it.
&::PushGlobalSQLState();
@@ -574,8 +576,9 @@ sub GetBug {
COUNT(bug_group_map.group_id)
FROM bugs LEFT JOIN bug_group_map
ON (bugs.bug_id = bug_group_map.bug_id)
- WHERE bugs.bug_id = $id
- GROUP BY bugs.bug_id");
+ WHERE bugs.bug_id = $id " .
+ $dbh->sql_group_by('bugs.bug_id',
+ 'short_desc, product_id, component_id'));
my $bug = { 'id' => $id };