From: Max Kanat-Alexander Date: Tue, 13 Jul 2010 02:22:44 +0000 (-0700) Subject: Bug 577602: Using multi-selects as buglist columns on PostgreSQL was broken X-Git-Tag: bugzilla-3.7.3~60 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a8d61d661ac36830be2cb8bb1a0bc2e9b6ede99a;p=thirdparty%2Fbugzilla.git Bug 577602: Using multi-selects as buglist columns on PostgreSQL was broken r=LpSolit, a=LpSolit --- diff --git a/Bugzilla/Search.pm b/Bugzilla/Search.pm index 89e2dfa61b..e0bed34ea6 100644 --- a/Bugzilla/Search.pm +++ b/Bugzilla/Search.pm @@ -1081,8 +1081,12 @@ sub init { foreach my $field (@fields) { # These fields never go into the GROUP BY (bug_id goes in # explicitly, below). - next if (grep($_ eq $field, EMPTY_COLUMN, - qw(bug_id actual_time percentage_complete flagtypes.name keywords))); + my @skip_group_by = (EMPTY_COLUMN, + qw(bug_id actual_time percentage_complete flagtypes.name + keywords)); + push(@skip_group_by, map { $_->name } @multi_select_fields); + + next if grep { $_ eq $field } @skip_group_by; my $col = COLUMNS->{$field}->{name}; push(@groupby, $col) if !grep($_ eq $col, @groupby); }