зеркало из https://github.com/mozilla/pjs.git
Bug 353623: SanityCheck 'rescanallbugmail' parameter not working (no 'changer' specified) - Patch by Fr�d�ric Buclin <LpSolit@gmail.com> r=ghendricks a=justdave
This commit is contained in:
Родитель
a11556f311
Коммит
419a5b0fa9
|
@ -168,7 +168,10 @@ sub ProcessOneBug {
|
|||
|
||||
# Convert to names, for later display
|
||||
$values{'changer'} = $changer;
|
||||
$values{'changername'} = Bugzilla::User->new({name => $changer})->name;
|
||||
# If no changer is specified, then it has no name.
|
||||
if ($changer) {
|
||||
$values{'changername'} = Bugzilla::User->new({name => $changer})->name;
|
||||
}
|
||||
$values{'assigned_to'} = user_id_to_login($values{'assigned_to'});
|
||||
$values{'reporter'} = user_id_to_login($values{'reporter'});
|
||||
if ($values{'qa_contact'}) {
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
#
|
||||
# You need to work with bug_email.pl the MIME::Parser installed.
|
||||
#
|
||||
# $Id: bug_email.pl,v 1.44 2006-07-03 21:42:47 mkanat%bugzilla.org Exp $
|
||||
# $Id: bug_email.pl,v 1.45 2006-09-22 23:14:53 lpsolit%gmail.com Exp $
|
||||
###############################################################
|
||||
|
||||
# 02/12/2000 (SML)
|
||||
|
@ -1173,7 +1173,7 @@ END
|
|||
# Send the 'you did it'-reply
|
||||
Reply( $SenderShort, $Message_ID,"Bugzilla success (ID $id)", $reply );
|
||||
|
||||
Bugzilla::BugMail::Send($id) if( ! $test);
|
||||
Bugzilla::BugMail::Send($id, {'changer' => $reporter}) if (!$test);
|
||||
|
||||
} else {
|
||||
# There were critical errors in the mail - the bug couldn't be inserted. !
|
||||
|
|
|
@ -29,6 +29,7 @@ use Bugzilla::Util;
|
|||
use Bugzilla::Error;
|
||||
use Bugzilla::User;
|
||||
use Bugzilla::Bug;
|
||||
use Bugzilla::BugMail;
|
||||
use Bugzilla::Flag;
|
||||
use Bugzilla::Field;
|
||||
use Bugzilla::Group;
|
||||
|
@ -716,7 +717,7 @@ if ($action eq 'search') {
|
|||
# Send mail about what we've done to bugs.
|
||||
# The deleted user is not notified of the changes.
|
||||
foreach (keys(%updatedbugs)) {
|
||||
Bugzilla::BugMail::Send($_);
|
||||
Bugzilla::BugMail::Send($_, {'changer' => $user->login} );
|
||||
}
|
||||
|
||||
###########################################################################
|
||||
|
|
|
@ -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) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче