aboutsummaryrefslogtreecommitdiffstats
path: root/Bugzilla
diff options
context:
space:
mode:
authorMax Kanat-Alexander <mkanat@bugzilla.org>2010-07-09 22:07:51 -0700
committerMax Kanat-Alexander <mkanat@bugzilla.org>2010-07-09 22:07:51 -0700
commit8bdb86fdce8ad3b177a81f3cf07bf026e2faa0e2 (patch)
tree204477c83187a9df1614c52cddb4895cbe816952 /Bugzilla
parent68f48be86941bebaaa005f1b10b507a7f0a3ab2b (diff)
downloadbugs-8bdb86fdce8ad3b177a81f3cf07bf026e2faa0e2.tar
bugs-8bdb86fdce8ad3b177a81f3cf07bf026e2faa0e2.tar.gz
bugs-8bdb86fdce8ad3b177a81f3cf07bf026e2faa0e2.tar.bz2
bugs-8bdb86fdce8ad3b177a81f3cf07bf026e2faa0e2.tar.xz
bugs-8bdb86fdce8ad3b177a81f3cf07bf026e2faa0e2.zip
Bug 577602: Don't put multi-select fields into the GROUP BY in Search.pm,
because they are created by an aggregate. (This fixes multi-select buglist columns on Pg.) r=mkanat, a=mkanat (module owner)
Diffstat (limited to 'Bugzilla')
-rw-r--r--Bugzilla/Search.pm8
1 files changed, 6 insertions, 2 deletions
diff --git a/Bugzilla/Search.pm b/Bugzilla/Search.pm
index 63e458655..c41579efe 100644
--- a/Bugzilla/Search.pm
+++ b/Bugzilla/Search.pm
@@ -1119,8 +1119,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);
}