From 49dea8edc8a4579880fce0130a85f91132bd7cb3 Mon Sep 17 00:00:00 2001 From: Matt Selsky Date: Mon, 5 Dec 2011 22:25:49 +0100 Subject: Bug 692354: Incorrect parameter type in WebServices documentation for Bug.add_comment r/a=mkanat --- Bugzilla/WebService/Bug.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Bugzilla/WebService') diff --git a/Bugzilla/WebService/Bug.pm b/Bugzilla/WebService/Bug.pm index 723550b09..e825e1ee6 100644 --- a/Bugzilla/WebService/Bug.pm +++ b/Bugzilla/WebService/Bug.pm @@ -2498,7 +2498,7 @@ This allows you to add a comment to a bug in Bugzilla. =over -=item C (int) B - The id or alias of the bug to append a +=item C (int or string) B - The id or alias of the bug to append a comment to. =item C (string) B - The comment to append to the bug. -- cgit v1.2.3-24-g4f1b From 62410084926e1473c903c43b53d09c99311746c2 Mon Sep 17 00:00:00 2001 From: Frédéric Buclin Date: Tue, 6 Dec 2011 12:59:28 +0100 Subject: Bug 657290: Bug.add_attachment() stores truncated timestamps in the DB (seconds are missing) r=dkl a=mkanat --- Bugzilla/WebService/Bug.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'Bugzilla/WebService') 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; -- cgit v1.2.3-24-g4f1b