Add type into Bug.add_comment WS

i18n
Vitaliy Filippov 2017-04-24 15:24:42 +03:00
parent 917f3e1566
commit 349af79c2e
2 changed files with 5 additions and 5 deletions

View File

@ -476,7 +476,7 @@ sub create
sub update sub update
{ {
my $self = shift; my $self = shift;
my ($additional_changes) = @_; my ($delta_ts, $additional_changes) = @_;
$self->make_dirty; $self->make_dirty;
@ -489,8 +489,7 @@ sub update
my $dbh = Bugzilla->dbh; my $dbh = Bugzilla->dbh;
my $user = Bugzilla->user; my $user = Bugzilla->user;
# FIXME 'shift ||' is just a temporary hack until all updating happens inside this function $delta_ts = $delta_ts || $dbh->selectrow_array('SELECT LOCALTIMESTAMP(0)');
my $delta_ts = shift || $dbh->selectrow_array('SELECT LOCALTIMESTAMP(0)');
# You can't set these fields by hand # You can't set these fields by hand
$self->{deadline} =~ s/\s+.*$//so; $self->{deadline} =~ s/\s+.*$//so;

View File

@ -979,8 +979,9 @@ sub add_comment {
# Append comment # Append comment
my $info = {}; my $info = {};
$bug->add_comment($comment, { isprivate => $params->{is_private}, $bug->add_comment($comment, { isprivate => $params->{is_private},
work_time => $params->{work_time} }); work_time => $params->{work_time},
$bug->update($info); type => $params->{type} || CMT_NORMAL });
$bug->update(undef, $info);
my $new_comment_id = $info->{added_comments}->[0]->{id}; my $new_comment_id = $info->{added_comments}->[0]->{id};