]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Backing out bug 271913: comments are no longer displayed, see also bug 565794
authorFrédéric Buclin <LpSolit@gmail.com>
Thu, 13 May 2010 23:55:50 +0000 (01:55 +0200)
committerFrédéric Buclin <LpSolit@gmail.com>
Thu, 13 May 2010 23:55:50 +0000 (01:55 +0200)
Bugzilla/Bug.pm
template/en/default/bug/comments.html.tmpl

index 9a915b6f8c80a6f123dea2021a93b0cedeb17c73..92db187445cf81d0729026bcca8cf84ad10c4e6d 100644 (file)
@@ -2245,7 +2245,11 @@ sub add_comment {
     $comment = $self->_check_comment($comment);
 
     $params ||= {};
-    $params->{work_time} = $self->_check_work_time($params->{work_time});
+    if (exists $params->{work_time}) {
+        $params->{work_time} = $self->_check_work_time($params->{work_time});
+        ThrowUserError('comment_required')
+            if $comment eq '' && $params->{work_time} != 0;
+    }
     if (exists $params->{type}) {
         $params->{type} = $self->_check_comment_type($params->{type});
     }
@@ -2255,7 +2259,7 @@ sub add_comment {
     }
     # XXX We really should check extra_data, too.
 
-    if ($comment eq '' && !($params->{type} || abs($params->{work_time}))) {
+    if ($comment eq '' && !($params->{type} || $params->{work_time})) {
         return;
     }
 
index 27f7b3593d66490fea9d9d8fff8f993a492dee4e..93b954e87699be5a58c4f471b09dfdf959e2f6d8 100644 (file)
@@ -94,7 +94,6 @@
 
 
 [% DEFAULT start_at = 0 mode = "show" %]
-[% timetracking_only = (comment_body == '' && comment.work_time != 0) %]
 [% sort_order = user.settings.comment_sort_order.value %]
 
 [%# NOTE: (start_at > 0) means we came here from a midair collision,
 
 [% BLOCK a_comment %]
   [% RETURN IF comment.is_private AND ! user.is_insider %]
-  [% RETURN IF timetracking_only AND !user.is_timetracker %]
 
     <div id="c[% count %]" class="bz_comment[% " bz_private" IF comment.is_private %]
                 [% " bz_comment_hilite" IF marks.$count %]