Commit 7beba3d3 authored by Kent Rogers's avatar Kent Rogers Committed by Max Kanat-Alexander

Bug 271913: Don't force the user to comment when adding Hours Worked

r=mkanat, a=mkanat
parent 2fee0823
......@@ -2407,11 +2407,7 @@ sub add_comment {
$comment = $self->_check_comment($comment);
$params ||= {};
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;
}
$params->{work_time} = $self->_check_work_time($params->{work_time});
if (exists $params->{type}) {
$params->{type} = $self->_check_comment_type($params->{type});
}
......@@ -2421,7 +2417,7 @@ sub add_comment {
}
# XXX We really should check extra_data, too.
if ($comment eq '' && !($params->{type} || $params->{work_time})) {
if ($comment eq '' && !($params->{type} || abs($params->{work_time}))) {
return;
}
......
......@@ -89,6 +89,7 @@
[% BLOCK a_comment %]
[% RETURN IF comment.is_private AND ! user.is_insider %]
[% RETURN IF comment.body == '' AND comment.work_time != 0 AND !user.is_timetracker %]
<div id="c[% count %]" class="bz_comment[% " bz_private" IF comment.is_private %]
[% " bz_comment_hilite" IF marks.$count %]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment