summaryrefslogtreecommitdiffstats
path: root/Bugzilla
diff options
context:
space:
mode:
authorKent Rogers <kar@cray.com>2010-05-26 03:45:33 +0200
committerMax Kanat-Alexander <mkanat@bugzilla.org>2010-05-26 03:45:33 +0200
commit7beba3d36ed5071c7425b69db20db1dc93371343 (patch)
tree20e709b24c5efb45adcd288a198c37445f64c2f1 /Bugzilla
parent2fee08231d953149cd3c6e77cf4cffbfd9322ad7 (diff)
downloadbugzilla-7beba3d36ed5071c7425b69db20db1dc93371343.tar.gz
bugzilla-7beba3d36ed5071c7425b69db20db1dc93371343.tar.xz
Bug 271913: Don't force the user to comment when adding Hours Worked
r=mkanat, a=mkanat
Diffstat (limited to 'Bugzilla')
-rw-r--r--Bugzilla/Bug.pm8
1 files changed, 2 insertions, 6 deletions
diff --git a/Bugzilla/Bug.pm b/Bugzilla/Bug.pm
index fb4972782..008155800 100644
--- a/Bugzilla/Bug.pm
+++ b/Bugzilla/Bug.pm
@@ -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;
}