From e99b3c135ae31ba62001b8308a5c3369800971e9 Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Sat, 23 Sep 2006 06:14:53 +0000 Subject: Bug 353623: SanityCheck 'rescanallbugmail' parameter not working (no 'changer' specified) - Patch by Frédéric Buclin r=ghendricks a=justdave MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sanitycheck.cgi | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'sanitycheck.cgi') diff --git a/sanitycheck.cgi b/sanitycheck.cgi index 1c7ab284f..dd9e50598 100755 --- a/sanitycheck.cgi +++ b/sanitycheck.cgi @@ -233,9 +233,19 @@ if (defined $cgi->param('rescanallBugMail')) { ORDER BY bug_id}); Status(scalar(@$list) . ' bugs found with possibly unsent mail.'); - + + my $vars = {}; + # We cannot simply look at the bugs_activity table to find who did the + # last change in a given bug, as e.g. adding a comment doesn't add any + # entry to this table. And some other changes may be private + # (such as time-related changes or private attachments or comments) + # and so choosing this user as being the last one having done a change + # for the bug may be problematic. So the best we can do at this point + # is to choose the currently logged in user for email notification. + $vars->{'changer'} = Bugzilla->user->login; + foreach my $bugid (@$list) { - Bugzilla::BugMail::Send($bugid); + Bugzilla::BugMail::Send($bugid, $vars); } if (scalar(@$list) > 0) { -- cgit v1.2.3-24-g4f1b