From: Alexander Tereschenko Date: Mon, 17 Dec 2012 22:38:24 +0000 (+0100) Subject: Bug 818890: Bugzilla doesn't obey the "Comment required on status transition" for... X-Git-Tag: bugzilla-4.5.1~266 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=64e21e0be7743a07841682c69f062b962550048e;p=thirdparty%2Fbugzilla.git Bug 818890: Bugzilla doesn't obey the "Comment required on status transition" for {Start}-> transition (for new bugs) r/a=LpSolit --- diff --git a/Bugzilla/Bug.pm b/Bugzilla/Bug.pm index f8b4d2142c..efad66f622 100644 --- a/Bugzilla/Bug.pm +++ b/Bugzilla/Bug.pm @@ -1323,11 +1323,12 @@ sub _check_bug_status { } # Check if a comment is required for this change. - if ($new_status->comment_required_on_change_from($old_status) && !$comment) + if ($new_status->comment_required_on_change_from($old_status) + && !$comment->{'thetext'}) { ThrowUserError('comment_required', - { old => $old_status->name, new => $new_status->name, - field => 'bug_status' }); + { old => $old_status ? $old_status->name : undef, + new => $new_status->name, field => 'bug_status' }); } if (ref $invocant