]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 818890: Bugzilla doesn't obey the "Comment required on status transition" for...
authorAlexander Tereschenko <aleksandr.v.tereschenko@linux.intel.com>
Mon, 17 Dec 2012 22:39:41 +0000 (23:39 +0100)
committerFrédéric Buclin <LpSolit@gmail.com>
Mon, 17 Dec 2012 22:39:41 +0000 (23:39 +0100)
r/a=LpSolit

Bugzilla/Bug.pm

index 666ee59e27cd0402d332b5a80fce6c6f136560c2..848a6a970d2b53568ceffad9e11e468cff72626a 100644 (file)
@@ -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