From: lpsolit%gmail.com <> Date: Wed, 13 Feb 2008 03:13:07 +0000 (+0000) Subject: Bug 416481: No bugmail is sent if no comment is added on bug creation - Patch by... X-Git-Tag: bugzilla-3.1.3~315 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bc040aab7fd89c27cfb396f0577b9b757ea05312;p=thirdparty%2Fbugzilla.git Bug 416481: No bugmail is sent if no comment is added on bug creation - Patch by Frédéric Buclin r/a=mkanat --- diff --git a/Bugzilla/Bug.pm b/Bugzilla/Bug.pm index 9be3830cfa..5cbe8a6198 100755 --- a/Bugzilla/Bug.pm +++ b/Bugzilla/Bug.pm @@ -1005,14 +1005,6 @@ sub _check_comment { $comment =~ s/\r\n?/\n/g; # Get rid of \r. ThrowUserError('comment_too_long') if length($comment) > MAX_COMMENT_LENGTH; - - # Creation-only checks - if (!ref $invocant) { - # On creation only, there must be a single-space comment, or - # email will be supressed. - $comment = ' ' if $comment eq ''; - } - return $comment; } diff --git a/Bugzilla/BugMail.pm b/Bugzilla/BugMail.pm index 13f25b5b43..2f132e2dea 100644 --- a/Bugzilla/BugMail.pm +++ b/Bugzilla/BugMail.pm @@ -605,7 +605,7 @@ sub sendMail { } } - if ($difftext eq "" && $newcomments eq "") { + if ($difftext eq "" && $newcomments eq "" && !$isnew) { # Whoops, no differences! return 0; }