From 410641ccf4ed887b3988222678704a8c5569002d Mon Sep 17 00:00:00 2001 From: "olav%bkor.dhs.org" <> Date: Tue, 14 Nov 2006 07:32:28 +0000 Subject: Bug 277370: Ability to specify an email address to which notification about all bugs should go Patch by Guillaume Rousse r=bkor a=myk --- Bugzilla/BugMail.pm | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) (limited to 'Bugzilla/BugMail.pm') diff --git a/Bugzilla/BugMail.pm b/Bugzilla/BugMail.pm index f5ad7c095..9a83b1cd3 100644 --- a/Bugzilla/BugMail.pm +++ b/Bugzilla/BugMail.pm @@ -50,11 +50,12 @@ use constant BIT_WATCHING => 2; # We need these strings for the X-Bugzilla-Reasons header # Note: this hash uses "," rather than "=>" to avoid auto-quoting of the LHS. use constant REL_NAMES => { - REL_ASSIGNEE, "AssignedTo", - REL_REPORTER, "Reporter", - REL_QA , "QAcontact", - REL_CC , "CC", - REL_VOTER , "Voter" + REL_ASSIGNEE , "AssignedTo", + REL_REPORTER , "Reporter", + REL_QA , "QAcontact", + REL_CC , "CC", + REL_VOTER , "Voter", + REL_GLOBAL_WATCHER, "GlobalWatcher" }; sub FormatTriple { @@ -392,7 +393,15 @@ sub Send { push (@{$watching{$watch->[0]}}, $watch->[1]); } } - + + # Global watcher + my @watchers = split(/[,\s]+/, Bugzilla->params->{'globalwatchers'}); + foreach (@watchers) { + my $watcher_id = login_to_id($_); + next unless $watcher_id; + $recipients{$watcher_id}->{+REL_GLOBAL_WATCHER} = BIT_DIRECT; + } + # We now have a complete set of all the users, and their relationships to # the bug in question. However, we are not necessarily going to mail them # all - there are preferences, permissions checks and all sorts to do yet. -- cgit v1.2.3-24-g4f1b