diff options
author | mkanat%bugzilla.org <> | 2009-07-21 20:36:40 +0200 |
---|---|---|
committer | mkanat%bugzilla.org <> | 2009-07-21 20:36:40 +0200 |
commit | e5dc8982e61b3b970d5c58d0ec545393c475b8ac (patch) | |
tree | bb571727cd3278e87b6b1f17eedb3260cb2b8b23 /Bugzilla/WebService | |
parent | b2c481d2b14773771d03f6eb94b7333e4934646e (diff) | |
download | bugzilla-e5dc8982e61b3b970d5c58d0ec545393c475b8ac.tar.gz bugzilla-e5dc8982e61b3b970d5c58d0ec545393c475b8ac.tar.xz |
Bug 505490: Make Bug.comments and Bug.attachments take an "ids" argument instead of a "bug_ids" argument
Patch by Max Kanat-Alexander <mkanat@bugzilla.org> r=LpSolit, a=mkanat
Diffstat (limited to 'Bugzilla/WebService')
-rw-r--r-- | Bugzilla/WebService/Bug.pm | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/Bugzilla/WebService/Bug.pm b/Bugzilla/WebService/Bug.pm index 76d0f9184..4e00d3230 100644 --- a/Bugzilla/WebService/Bug.pm +++ b/Bugzilla/WebService/Bug.pm @@ -77,15 +77,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; @@ -432,10 +432,10 @@ sub update_see_also { } sub attachments { - my ($self, $params) = validate(@_, 'bug_ids'); + my ($self, $params) = validate(@_, 'ids'); - my $ids = $params->{bug_ids}; - defined $ids || ThrowCodeError('param_required', { param => 'bug_ids' }); + my $ids = $params->{ids}; + defined $ids || ThrowCodeError('param_required', { param => 'ids' }); my %attachments; foreach my $bug_id (@$ids) { @@ -634,9 +634,9 @@ insidergroup or if you are the submitter of the attachment. =over -=item C<bug_ids> +=item C<ids> -See the description of the C<bug_ids> parameter in the L</get> method. +See the description of the C<ids> parameter in the L</get> method. =back @@ -730,7 +730,7 @@ and/or comment ids. =item B<Params> -B<Note>: At least one of C<bug_ids> or C<comment_ids> is required. +B<Note>: At least one of C<ids> or C<comment_ids> is required. In addition to the parameters below, this method also accepts the standard L<include_fields|Bugzilla::WebService/include_fields> and @@ -738,7 +738,7 @@ L<exclude_fields|Bugzilla::WebService/exclude_fields> arguments. =over -=item C<bug_ids> +=item C<ids> C<array> 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 @@ -753,7 +753,7 @@ respective bugs. =item C<new_since> C<dateTime> If specified, the method will only return comments I<newer> -than this time. This only affects comments returned from the C<bug_ids> +than this time. This only affects comments returned from the C<ids> argument. You will always be returned all comments you request in the C<comment_ids> argument, even if they are older than this date. @@ -767,13 +767,13 @@ Two items are returned: =item C<bugs> -This is used for bugs specified in C<bug_ids>. This is a hash, +This is used for bugs specified in C<ids>. 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<comments>, 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<bug_ids>, it will still only be +specify an id multiple times in C<ids>, it will still only be returned once. =item C<comments> |