]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 437003 รข\80\93 Add hook to buglist.cgi to add columns to bug list
authormkanat%bugzilla.org <>
Sat, 28 Jun 2008 23:13:50 +0000 (23:13 +0000)
committermkanat%bugzilla.org <>
Sat, 28 Jun 2008 23:13:50 +0000 (23:13 +0000)
Patch By Elliotte Martin <elliotte_martin@yahoo.com> r=mkanat, a=mkanat

Bugzilla/Hook.pm
buglist.cgi

index 90ac16237dba94b5b5f9228ef6faddf6032bef70..717baf6512463742764740fef0b11cd9c96b3666 100644 (file)
@@ -127,7 +127,37 @@ They will be accessible to the hook via L<Bugzilla/hook_args>.
 
 =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<columns> - 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<name> - The name of the column in the database.
+
+=item C<title> - 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
 
index 5e6936b1f491d12becb592e25a53884aba5cac63..ca693dfb3aeee8379c7ef389957dd51206f77c1c 100755 (executable)
@@ -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
 ################################################################################