diff options
author | Frédéric Buclin <LpSolit@gmail.com> | 2012-07-24 16:01:43 +0200 |
---|---|---|
committer | Frédéric Buclin <LpSolit@gmail.com> | 2012-07-24 16:01:43 +0200 |
commit | d196515a44bc39a26e4b49f18aa9324cae5cc5a3 (patch) | |
tree | 1274a47e008e8c0a947f6743e0f8ff1c542ed8a3 /Bugzilla | |
parent | 83195bc9d7f8229cd3c703a396b03d09e7971a56 (diff) | |
download | bugs-d196515a44bc39a26e4b49f18aa9324cae5cc5a3.tar bugs-d196515a44bc39a26e4b49f18aa9324cae5cc5a3.tar.gz bugs-d196515a44bc39a26e4b49f18aa9324cae5cc5a3.tar.bz2 bugs-d196515a44bc39a26e4b49f18aa9324cae5cc5a3.tar.xz bugs-d196515a44bc39a26e4b49f18aa9324cae5cc5a3.zip |
Bug 753688: Classification doesn't work as z-axis on reports
r=glob a=LpSolit
Diffstat (limited to 'Bugzilla')
-rw-r--r-- | Bugzilla/Search.pm | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/Bugzilla/Search.pm b/Bugzilla/Search.pm index 3d9392769..8ae2c6ff8 100644 --- a/Bugzilla/Search.pm +++ b/Bugzilla/Search.pm @@ -832,28 +832,38 @@ sub _add_extra_column { } # These are the columns that we're going to be actually SELECTing. +sub _display_columns { + my ($self) = @_; + # Do not alter the list specified here at all, even if they are duplicated. + # Those are passed by the caller, and the caller expects to get them back + # in the exact same order. + $self->{display_columns} ||= [$self->_input_columns, $self->_extra_columns]; + return @{ $self->{display_columns} }; +} + +# These are the columns that are involved in the query. sub _select_columns { my ($self) = @_; return @{ $self->{select_columns} } if $self->{select_columns}; my @select_columns; - foreach my $column ($self->_input_columns, $self->_extra_columns) { + foreach my $column ($self->_display_columns) { if (my $add_first = COLUMN_DEPENDS->{$column}) { push(@select_columns, @$add_first); } push(@select_columns, $column); } - + # Remove duplicated columns. $self->{select_columns} = [uniq @select_columns]; return @{ $self->{select_columns} }; } -# This takes _select_columns and translates it into the actual SQL that +# This takes _display_columns and translates it into the actual SQL that # will go into the SELECT clause. sub _sql_select { my ($self) = @_; my @sql_fields; - foreach my $column ($self->_select_columns) { + foreach my $column ($self->_display_columns) { my $alias = $column; # Aliases cannot contain dots in them. We convert them to underscores. $alias =~ s/\./_/g; |