summaryrefslogtreecommitdiffstats
path: root/extensions
diff options
context:
space:
mode:
authorrojanu <aliustek@gmail.com>2012-04-10 20:34:43 +0200
committerFrédéric Buclin <LpSolit@gmail.com>2012-04-10 20:34:43 +0200
commitb4fee2c33267420765ed2bf15a639a5d36d35fc5 (patch)
tree4eb5c1fc2d69ca3c15c7bf06c150b1712fb99e54 /extensions
parent4b18c781b5cb949e4166f66d312e33820834fdc8 (diff)
downloadbugzilla-b4fee2c33267420765ed2bf15a639a5d36d35fc5.tar.gz
bugzilla-b4fee2c33267420765ed2bf15a639a5d36d35fc5.tar.xz
Bug 743991: Need a new hook to update Bugzilla::Search::COLUMN_JOINS
r/a=LpSolit
Diffstat (limited to 'extensions')
-rw-r--r--extensions/Example/Extension.pm16
1 files changed, 16 insertions, 0 deletions
diff --git a/extensions/Example/Extension.pm b/extensions/Example/Extension.pm
index a2ab3b5fc..5cd6a1d29 100644
--- a/extensions/Example/Extension.pm
+++ b/extensions/Example/Extension.pm
@@ -181,6 +181,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 {