Commit 5c90b7dc authored by Frédéric Buclin's avatar Frédéric Buclin

Bug 657290: Bug.add_attachment() stores truncated timestamps in the DB (seconds are missing)

r=dkl a=mkanat
parent d9649490
......@@ -631,9 +631,12 @@ sub add_attachment {
my @created;
$dbh->bz_start_transaction();
my $timestamp = $dbh->selectrow_array('SELECT LOCALTIMESTAMP(0)');
foreach my $bug (@bugs) {
my $attachment = Bugzilla::Attachment->create({
bug => $bug,
creation_ts => $timestamp,
data => $params->{data},
description => $params->{summary},
filename => $params->{file_name},
......@@ -648,7 +651,7 @@ sub add_attachment {
extra_data => $attachment->id });
push(@created, $attachment);
}
$_->bug->update($_->attached) foreach @created;
$_->bug->update($timestamp) foreach @created;
$dbh->bz_commit_transaction();
$_->send_changes() foreach @bugs;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment