From: Alexander Tereschenko Date: Mon, 17 Dec 2012 22:39:41 +0000 (+0100) Subject: Bug 818890: Bugzilla doesn't obey the "Comment required on status transition" for... X-Git-Tag: bugzilla-4.4rc2~43 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=57e0f01892a74b7b9e4b5132bc0d1d65bbdc1624;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 666ee59e27..848a6a970d 100644 --- a/Bugzilla/Bug.pm +++ b/Bugzilla/Bug.pm @@ -1311,11 +1311,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