From d93f2e56c9607d5ad4fb1dd95e63c6cc0940cbc9 Mon Sep 17 00:00:00 2001 From: Max Kanat-Alexander Date: Thu, 11 Feb 2010 10:56:08 -0800 Subject: Bug 545683: New Hook: bugmail_recipients r=mkanat, a=mkanat (module owner) --- Bugzilla/Hook.pm | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) (limited to 'Bugzilla/Hook.pm') diff --git a/Bugzilla/Hook.pm b/Bugzilla/Hook.pm index 1f92f332d..36f083975 100644 --- a/Bugzilla/Hook.pm +++ b/Bugzilla/Hook.pm @@ -356,6 +356,44 @@ The definition is structured as: =back +=head2 bugmail_recipients + +This allows you to modify the list of users who are going to be receiving +a particular bugmail. It also allows you to specify why they are receiving +the bugmail. + +Users' bugmail preferences will be applied to any users that you add +to the list. (So, for example, if you add somebody as though they were +a CC on the bug, and their preferences state that they don't get email +when they are a CC, they won't get email.) + +This hook is called before watchers or globalwatchers are added to the +recipient list. + +Params: + +=over + +=item C + +This is a hashref. The keys are numeric user ids from the C +table in the database, for each user who should be receiving this bugmail. +The values are hashrefs. The keys in I hashrefs correspond to +the "relationship" that the user has to the bug they're being emailed +about, and the value should always be C<1>. The "relationships" +are described by the various C constants in L. + +Here's an example of adding userid C<123> to the recipient list +as though he were on the CC list: + + $recipients->{123}->{+REL_CC} = 1 + +(We use C<+> in front of C so that Perl interprets it as a constant +instead of as a string.) + +=back + + =head2 colchange_columns This happens in F right after the list of possible display -- cgit v1.2.3-24-g4f1b