diff options
author | mkanat%bugzilla.org <> | 2007-11-05 01:17:57 +0000 |
---|---|---|
committer | mkanat%bugzilla.org <> | 2007-11-05 01:17:57 +0000 |
commit | 9f774e4a6de07003873bb20a68989d8e7f6fd544 (patch) | |
tree | a28d0a8a4caebf0a1d3e9fc9ca58effac54ae5c2 /Bugzilla | |
parent | 682cf8e706eac2deaf67dbce67bd6f775dd5e216 (diff) | |
download | bugs-9f774e4a6de07003873bb20a68989d8e7f6fd544.tar bugs-9f774e4a6de07003873bb20a68989d8e7f6fd544.tar.gz bugs-9f774e4a6de07003873bb20a68989d8e7f6fd544.tar.bz2 bugs-9f774e4a6de07003873bb20a68989d8e7f6fd544.tar.xz bugs-9f774e4a6de07003873bb20a68989d8e7f6fd544.zip |
Bug 401953: Move work_time validation from process_bug to Bugzilla::Bug
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=LpSolit, a=LpSolit
Diffstat (limited to 'Bugzilla')
-rwxr-xr-x | Bugzilla/Bug.pm | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Bugzilla/Bug.pm b/Bugzilla/Bug.pm index ba66e846f..7ffc3b52e 100755 --- a/Bugzilla/Bug.pm +++ b/Bugzilla/Bug.pm @@ -496,6 +496,10 @@ sub update { $dbh->do("INSERT INTO longdescs (bug_id, who, bug_when, $columns) VALUES (?,?,?,$qmarks)", undef, $self->bug_id, Bugzilla->user->id, $delta_ts, @values); + if ($comment->{work_time}) { + LogActivityEntry($self->id, "work_time", "", $comment->{work_time}, + Bugzilla->user->id, $delta_ts); + } } # Insert the values into the multiselect value tables @@ -1547,6 +1551,8 @@ 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 (exists $params->{type}) { $params->{type} = $self->_check_comment_type($params->{type}); |