From 5fcfa9bb89f95849ffdb44df4f9e68a6032a7288 Mon Sep 17 00:00:00 2001 From: Frédéric Buclin Date: Fri, 14 May 2010 01:55:50 +0200 Subject: Backing out bug 271913: comments are no longer displayed, see also bug 565794 --- Bugzilla/Bug.pm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'Bugzilla') diff --git a/Bugzilla/Bug.pm b/Bugzilla/Bug.pm index 9a915b6f8..92db18744 100644 --- a/Bugzilla/Bug.pm +++ b/Bugzilla/Bug.pm @@ -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; } -- cgit v1.2.3-24-g4f1b