Commit f170f68d authored by reed%reedloden.com's avatar reed%reedloden.com

Bug 534587 - "Bugmail uses the timezone of the changee instead of the user…

Bug 534587 - "Bugmail uses the timezone of the changee instead of the user receiving the mail" [p=reed r=mkanat a=mkanat]
parent 0c266590
...@@ -612,7 +612,7 @@ sub sendMail { ...@@ -612,7 +612,7 @@ sub sendMail {
my $vars = { my $vars = {
isnew => $isnew, isnew => $isnew,
to => $user->email, to_user => $user,
bugid => $id, bugid => $id,
alias => Bugzilla->params->{'usebugaliases'} ? $values{'alias'} : "", alias => Bugzilla->params->{'usebugaliases'} ? $values{'alias'} : "",
classification => $values{'classification'}, classification => $values{'classification'},
......
...@@ -413,8 +413,8 @@ sub wrap_hard { ...@@ -413,8 +413,8 @@ sub wrap_hard {
sub format_time { sub format_time {
my ($date, $format, $timezone) = @_; my ($date, $format, $timezone) = @_;
# If $format is undefined, try to guess the correct date format. # If $format is not set, try to guess the correct date format.
if (!defined($format)) { if (!$format) {
if (!ref $date if (!ref $date
&& $date =~ /^(\d{4})[-\.](\d{2})[-\.](\d{2}) (\d{2}):(\d{2})(:(\d{2}))?$/) && $date =~ /^(\d{4})[-\.](\d{2})[-\.](\d{2}) (\d{2}):(\d{2})(:(\d{2}))?$/)
{ {
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
[% PROCESS "global/variables.none.tmpl" %] [% PROCESS "global/variables.none.tmpl" %]
From: [% Param('mailfrom') %] From: [% Param('mailfrom') %]
To: [% to %] To: [% to_user.email %]
Subject: [[% terms.Bug %] [%+ bugid %]] [% 'New: ' IF isnew %][%+ summary %] Subject: [[% terms.Bug %] [%+ bugid %]] [% 'New: ' IF isnew %][%+ summary %]
X-Bugzilla-Reason: [% reasonsheader %] X-Bugzilla-Reason: [% reasonsheader %]
X-Bugzilla-Type: [% isnew ? 'new' : 'changed' %] X-Bugzilla-Type: [% isnew ? 'new' : 'changed' %]
...@@ -48,7 +48,7 @@ X-Bugzilla-Changed-Fields: [% changedfields %] ...@@ -48,7 +48,7 @@ X-Bugzilla-Changed-Fields: [% changedfields %]
[% FOREACH comment = new_comments %] [% FOREACH comment = new_comments %]
[%- IF comment.count %] [%- IF comment.count %]
--- Comment #[% comment.count %] from [% comment.author.identity %] [%+ comment.time FILTER time %] --- --- Comment #[% comment.count %] from [% comment.author.identity %] [%+ comment.time FILTER time(undef, to_user.timezone) %] ---
[% END %] [% END %]
[%+ comment.body_full({ is_bugmail => 1, wrap => 1 }) %] [%+ comment.body_full({ is_bugmail => 1, wrap => 1 }) %]
[% END %] [% END %]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment