From 64e21e0be7743a07841682c69f062b962550048e Mon Sep 17 00:00:00 2001 From: Alexander Tereschenko Date: Mon, 17 Dec 2012 23:38:24 +0100 Subject: Bug 818890: Bugzilla doesn't obey the "Comment required on status transition" for {Start}-> transition (for new bugs) r/a=LpSolit --- Bugzilla/Bug.pm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'Bugzilla') diff --git a/Bugzilla/Bug.pm b/Bugzilla/Bug.pm index f8b4d2142..efad66f62 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 -- cgit v1.2.3-24-g4f1b