From: mkanat%bugzilla.org <> Date: Tue, 21 Jul 2009 18:39:49 +0000 (+0000) Subject: Bug 505490: Make Bug.comments take an "ids" argument instead of a "comment_ids" argument X-Git-Tag: bugzilla-3.4~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=66ec00445c36f76b35919b08e1cd475ecc53a794;p=thirdparty%2Fbugzilla.git Bug 505490: Make Bug.comments take an "ids" argument instead of a "comment_ids" argument Patch by Max Kanat-Alexander r=LpSolit, a=mkanat --- diff --git a/Bugzilla/WebService/Bug.pm b/Bugzilla/WebService/Bug.pm index 96b7853f2b..0ebf236719 100644 --- a/Bugzilla/WebService/Bug.pm +++ b/Bugzilla/WebService/Bug.pm @@ -72,15 +72,15 @@ BEGIN { ########### sub comments { - my ($self, $params) = validate(@_, 'bug_ids', 'comment_ids'); + my ($self, $params) = validate(@_, 'ids', 'comment_ids'); - if (!(defined $params->{bug_ids} || defined $params->{comment_ids})) { + if (!(defined $params->{ids} || defined $params->{comment_ids})) { ThrowCodeError('params_required', { function => 'Bug.comments', - params => ['bug_ids', 'comment_ids'] }); + params => ['ids', 'comment_ids'] }); } - my $bug_ids = $params->{bug_ids} || []; + my $bug_ids = $params->{ids} || []; my $comment_ids = $params->{comment_ids} || []; my $dbh = Bugzilla->dbh; @@ -584,7 +584,7 @@ and/or comment ids. =item B -B: At least one of C or C is required. +B: At least one of C or C is required. In addition to the parameters below, this method also accepts the standard L and @@ -592,7 +592,7 @@ L arguments. =over -=item C +=item C C An array that can contain both bug IDs and bug aliases. All of the comments (that are visible to you) will be returned for the @@ -607,7 +607,7 @@ respective bugs. =item C C If specified, the method will only return comments I -than this time. This only affects comments returned from the C +than this time. This only affects comments returned from the C argument. You will always be returned all comments you request in the C argument, even if they are older than this date. @@ -621,13 +621,13 @@ Two items are returned: =item C -This is used for bugs specified in C. This is a hash, +This is used for bugs specified in C. This is a hash, where the keys are the numeric ids of the bugs, and the value is a hash with a single key, C, which is an array of comments. (The format of comments is described below.) Note that any individual bug will only be returned once, so if you -specify an id multiple times in C, it will still only be +specify an id multiple times in C, it will still only be returned once. =item C