diff options
author | Max Kanat-Alexander <mkanat@bugzilla.org> | 2010-02-11 10:56:08 -0800 |
---|---|---|
committer | Max Kanat-Alexander <mkanat@bugzilla.org> | 2010-02-11 10:56:08 -0800 |
commit | d93f2e56c9607d5ad4fb1dd95e63c6cc0940cbc9 (patch) | |
tree | 090baea104777b0868d20de49e808f211aadcf7c /Bugzilla/Hook.pm | |
parent | Bug 545576 - "Add "greaterthaneq" and "lessthaneq" charts to do >= and <= sea... (diff) | |
download | bugzilla-d93f2e56c9607d5ad4fb1dd95e63c6cc0940cbc9.tar.gz bugzilla-d93f2e56c9607d5ad4fb1dd95e63c6cc0940cbc9.tar.bz2 bugzilla-d93f2e56c9607d5ad4fb1dd95e63c6cc0940cbc9.zip |
Bug 545683: New Hook: bugmail_recipients
r=mkanat, a=mkanat (module owner)
Diffstat (limited to 'Bugzilla/Hook.pm')
-rw-r--r-- | Bugzilla/Hook.pm | 38 |
1 files changed, 38 insertions, 0 deletions
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<recipients> + +This is a hashref. The keys are numeric user ids from the C<profiles> +table in the database, for each user who should be receiving this bugmail. +The values are hashrefs. The keys in I<these> 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<REL_> constants in L<Bugzilla::Constants>. + +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<REL_CC> so that Perl interprets it as a constant +instead of as a string.) + +=back + + =head2 colchange_columns This happens in F<colchange.cgi> right after the list of possible display |