diff options
Diffstat (limited to 'Bugzilla/WebService/Bug.pm')
-rw-r--r-- | Bugzilla/WebService/Bug.pm | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Bugzilla/WebService/Bug.pm b/Bugzilla/WebService/Bug.pm index e825e1ee6..ea1becc0a 100644 --- a/Bugzilla/WebService/Bug.pm +++ b/Bugzilla/WebService/Bug.pm @@ -639,9 +639,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}, @@ -656,7 +659,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; |