diff options
Diffstat (limited to 'Bugzilla/User.pm')
-rw-r--r-- | Bugzilla/User.pm | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Bugzilla/User.pm b/Bugzilla/User.pm index 55be2cf9e..0eb47b8b3 100644 --- a/Bugzilla/User.pm +++ b/Bugzilla/User.pm @@ -1372,8 +1372,9 @@ our %names_to_events = ( # Note: the "+" signs before the constants suppress bareword quoting. sub wants_bug_mail { my $self = shift; - my ($bug_id, $relationship, $fieldDiffs, $commentField, $dependencyText, + my ($bug_id, $relationship, $fieldDiffs, $comments, $dependencyText, $changer, $bug_is_new) = @_; + my $comments_concatenated = join("\n", map { $_->{body} } (@$comments)); # Make a list of the events which have happened during this bug change, # from the point of view of this user. @@ -1422,10 +1423,10 @@ sub wants_bug_mail { } } - if ($commentField =~ /Created an attachment \(/) { + if ($comments_concatenated =~ /Created an attachment \(/) { $events{+EVT_ATTACHMENT} = 1; } - elsif ($commentField ne '') { + elsif (defined($$comments[0])) { $events{+EVT_COMMENT} = 1; } |