From 8a185b6122f51e21c38f4e206b92d66c35ce2a78 Mon Sep 17 00:00:00 2001 From: "mkanat%bugzilla.org" <> Date: Sat, 28 Jun 2008 23:13:50 +0000 Subject: [PATCH] =?utf8?q?Bug=20437003=20=C3=A2=C2=80=C2=93=20Add=20hook?= =?utf8?q?=20to=20buglist.cgi=20to=20add=20columns=20to=20bug=20list=20Pat?= =?utf8?q?ch=20By=20Elliotte=20Martin=20=20r?= =?utf8?q?=3Dmkanat,=20a=3Dmkanat?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- Bugzilla/Hook.pm | 32 +++++++++++++++++++++++++++++++- buglist.cgi | 2 ++ 2 files changed, 33 insertions(+), 1 deletion(-) diff --git a/Bugzilla/Hook.pm b/Bugzilla/Hook.pm index 90ac16237d..717baf6512 100644 --- a/Bugzilla/Hook.pm +++ b/Bugzilla/Hook.pm @@ -127,7 +127,37 @@ They will be accessible to the hook via L. =head1 HOOKS -This describes what hooks exist in Bugzilla currently. +This describes what hooks exist in Bugzilla currently. They are mostly +in alphabetical order, but some related hooks are near each other instead +of being alphabetical. + +=head2 buglist-columns + +This happens in buglist.cgi after the standard columns have been defined and +right before the display column determination. It gives you the opportunity +to add additional display columns. + +Params: + +=over + +=item C - A hashref, where the keys are unique string identifiers +for the column being defined and the values are hashrefs with the +following fields: + +=over + +=item C - The name of the column in the database. + +=item C - The title of the column as displayed to users. + +=back + +The definition is structured as: + + $columns->{$id} = { name => $name, title => $title }; + +=back =head2 enter_bug-entrydefaultvars diff --git a/buglist.cgi b/buglist.cgi index 5e6936b1f4..ca693dfb3a 100755 --- a/buglist.cgi +++ b/buglist.cgi @@ -666,6 +666,8 @@ foreach my $field (Bugzilla->get_fields({ custom => 1, obsolete => 0})) { DefineColumn($field->name, 'bugs.' . $field->name, $field->description); } +Bugzilla::Hook::process("buglist-columns", {'columns' => $columns} ); + ################################################################################ # Display Column Determination ################################################################################ -- 2.47.2