Fix deadline history logging

classes
Vitaliy Filippov 2016-01-22 17:14:40 +03:00
parent 5b4ce0bd96
commit 98b88de635
2 changed files with 5 additions and 2 deletions

View File

@ -480,6 +480,7 @@ sub update
my $delta_ts = shift || $dbh->selectrow_array('SELECT LOCALTIMESTAMP(0)');
# You can't set these fields by hand
$self->{deadline} =~ s/\s+.*$//so;
$self->{delta_ts} = $delta_ts;
delete $self->{votes};
delete $self->{lastdiffed};
@ -498,7 +499,8 @@ sub update
if ($self->id)
{
($changes, $old_bug) = $self->SUPER::update(@_);
$old_bug->{deadline} =~ s/\s+.*$//so;
($changes, $old_bug) = $self->SUPER::update(undef, $old_bug);
}
else
{

View File

@ -334,6 +334,7 @@ sub set_all
sub update
{
my $self = shift;
my (undef, $old_self) = @_;
my $dbh = Bugzilla->dbh;
my $table = $self->DB_TABLE;
@ -342,7 +343,7 @@ sub update
$dbh->bz_start_transaction();
# Use a copy of old object
my $old_self = $self->new($self->id);
$old_self ||= $self->new($self->id);
my $numeric = $self->NUMERIC_COLUMNS;
my $date = $self->DATE_COLUMNS;