aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2006-09-23 06:14:53 +0000
committerlpsolit%gmail.com <>2006-09-23 06:14:53 +0000
commite99b3c135ae31ba62001b8308a5c3369800971e9 (patch)
treeab1b7adc93b557c4a745c0ceaa755d91dc40a7b4 /sanitycheck.cgi
parentBug 353820: The confirmation page when deleting a user account who has entrie... (diff)
downloadbugzilla-e99b3c135ae31ba62001b8308a5c3369800971e9.tar.gz
bugzilla-e99b3c135ae31ba62001b8308a5c3369800971e9.tar.bz2
bugzilla-e99b3c135ae31ba62001b8308a5c3369800971e9.zip
Bug 353623: SanityCheck 'rescanallbugmail' parameter not working (no 'changer' specified) - Patch by Frédéric Buclin <LpSolit@gmail.com> r=ghendricks a=justdave
Diffstat (limited to 'sanitycheck.cgi')
-rwxr-xr-xsanitycheck.cgi14
1 files changed, 12 insertions, 2 deletions
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) {