diff options
author | rojanu <aliustek@gmail.com> | 2012-04-10 20:36:46 +0200 |
---|---|---|
committer | Frédéric Buclin <LpSolit@gmail.com> | 2012-04-10 20:36:46 +0200 |
commit | 4e4dfab33df60ecb6a529999b8900f4dc19d9b91 (patch) | |
tree | 3edc60a3fda069bea37763021e3f708f8d2eb353 /extensions/Example | |
parent | 6de7db5b4dab5309ca1683d58ce444cc6e6bdf88 (diff) | |
download | bugzilla-4e4dfab33df60ecb6a529999b8900f4dc19d9b91.tar.gz bugzilla-4e4dfab33df60ecb6a529999b8900f4dc19d9b91.tar.xz |
Bug 743991: Need a new hook to update Bugzilla::Search::COLUMN_JOINS
r/a=LpSolit
Diffstat (limited to 'extensions/Example')
-rw-r--r-- | extensions/Example/Extension.pm | 16 |
1 files changed, 16 insertions, 0 deletions
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 { |