Bug 87006 - Allow empty worktime-only comments
git-svn-id: svn://svn.office.custis.ru/3rdparty/bugzilla.org/trunk@1465 6955db30-a419-402b-8a0d-67ecbb4d7f56master
parent
d539ab44c4
commit
c0c6d59bd3
|
@ -2506,8 +2506,13 @@ sub add_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;
|
||||
if ($comment eq '' && $params->{work_time} != 0 &&
|
||||
(!exists $params->{type} ||
|
||||
$params->{type} != CMT_WORKTIME &&
|
||||
$params->{type} != CMT_BACKDATED_WORKTIME))
|
||||
{
|
||||
ThrowUserError('comment_required');
|
||||
}
|
||||
}
|
||||
if (exists $params->{type}) {
|
||||
$params->{type} = $self->_check_comment_type($params->{type});
|
||||
|
|
Loading…
Reference in New Issue