]> 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:38:24 +0000 (23:38 +0100)
committerFrédéric Buclin <LpSolit@gmail.com>
Mon, 17 Dec 2012 22:38:24 +0000 (23:38 +0100)
r/a=LpSolit

Bugzilla/Bug.pm

index f8b4d2142c2cac887635d319b153d82560f5186d..efad66f622865395f824fea2d4e3416a73369b8a 100644 (file)
@@ -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