summaryrefslogtreecommitdiffstats
path: root/Bugzilla/WebService
diff options
context:
space:
mode:
authorDave Lawrence <dlawrence@mozilla.com>2011-12-08 21:01:57 +0100
committerDave Lawrence <dlawrence@mozilla.com>2011-12-08 21:01:57 +0100
commit60fb0c9b84f771a16a8abed0e1847b409b197217 (patch)
tree91630354cc75f081c38a95a30907e9aa2647bc13 /Bugzilla/WebService
parent720db163b9814b294b163347d994e513b8771ae7 (diff)
parent62410084926e1473c903c43b53d09c99311746c2 (diff)
downloadbugzilla-60fb0c9b84f771a16a8abed0e1847b409b197217.tar.gz
bugzilla-60fb0c9b84f771a16a8abed0e1847b409b197217.tar.xz
merged with bugzilla/4.2
Diffstat (limited to 'Bugzilla/WebService')
-rw-r--r--Bugzilla/WebService/Bug.pm7
1 files changed, 5 insertions, 2 deletions
diff --git a/Bugzilla/WebService/Bug.pm b/Bugzilla/WebService/Bug.pm
index 8506c4b47..ca9ee1014 100644
--- a/Bugzilla/WebService/Bug.pm
+++ b/Bugzilla/WebService/Bug.pm
@@ -665,9 +665,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},
@@ -682,7 +685,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;
@@ -2541,7 +2544,7 @@ This allows you to add a comment to a bug in Bugzilla.
=over
-=item C<id> (int) B<Required> - The id or alias of the bug to append a
+=item C<id> (int or string) B<Required> - The id or alias of the bug to append a
comment to.
=item C<comment> (string) B<Required> - The comment to append to the bug.