]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 577602: Using multi-selects as buglist columns on PostgreSQL was broken
authorMax Kanat-Alexander <mkanat@bugzilla.org>
Tue, 13 Jul 2010 02:22:44 +0000 (19:22 -0700)
committerMax Kanat-Alexander <mkanat@bugzilla.org>
Tue, 13 Jul 2010 02:22:44 +0000 (19:22 -0700)
r=LpSolit, a=LpSolit

Bugzilla/Search.pm

index 89e2dfa61b93d683c7e40a84cd7ec162ea112165..e0bed34ea6f180134ffc442a569c355eb29ee695 100644 (file)
@@ -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);
     }