From 4e4dfab33df60ecb6a529999b8900f4dc19d9b91 Mon Sep 17 00:00:00 2001 From: rojanu Date: Tue, 10 Apr 2012 20:36:46 +0200 Subject: Bug 743991: Need a new hook to update Bugzilla::Search::COLUMN_JOINS r/a=LpSolit --- extensions/Example/Extension.pm | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'extensions') diff --git a/extensions/Example/Extension.pm b/extensions/Example/Extension.pm index af56b506b..f55e60637 100644 --- a/extensions/Example/Extension.pm +++ b/extensions/Example/Extension.pm @@ -196,6 +196,22 @@ sub buglist_columns { my $columns = $args->{'columns'}; $columns->{'example'} = { 'name' => 'bugs.delta_ts' , 'title' => 'Example' }; + $columns->{'product_desc'} = { 'name' => 'prod_desc.description', + 'title' => 'Product Description' }; +} + +sub buglist_column_joins { + my ($self, $args) = @_; + my $joins = $args->{'column_joins'}; + + # This column is added using the "buglist_columns" hook + $joins->{'product_desc'} = { + from => 'product_id', + to => 'id', + table => 'products', + as => 'prod_desc', + join => 'INNER', + }; } sub search_operator_field_override { -- cgit v1.2.3-24-g4f1b