my $vars = {
isnew => $isnew,
- to => $user->email,
+ to_user => $user,
bugid => $id,
alias => Bugzilla->params->{'usebugaliases'} ? $values{'alias'} : "",
classification => $values{'classification'},
sub format_time {
my ($date, $format, $timezone) = @_;
- # If $format is undefined, try to guess the correct date format.
- if (!defined($format)) {
+ # If $format is not set, try to guess the correct date format.
+ if (!$format) {
if (!ref $date
&& $date =~ /^(\d{4})[-\.](\d{2})[-\.](\d{2}) (\d{2}):(\d{2})(:(\d{2}))?$/)
{
[% PROCESS "global/variables.none.tmpl" %]
From: [% Param('mailfrom') %]
-To: [% to %]
+To: [% to_user.email %]
Subject: [[% terms.Bug %] [%+ bugid %]] [% 'New: ' IF isnew %][%+ summary %]
X-Bugzilla-Reason: [% reasonsheader %]
X-Bugzilla-Type: [% isnew ? 'new' : 'changed' %]
[% FOREACH comment = new_comments %]
[%- 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 %]
[%+ comment.body_full({ is_bugmail => 1, wrap => 1 }) %]
[% END %]