diff options
-rw-r--r-- | extensions/Review/lib/WebService.pm | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/extensions/Review/lib/WebService.pm b/extensions/Review/lib/WebService.pm index 24d38b2f1..76c79a758 100644 --- a/extensions/Review/lib/WebService.pm +++ b/extensions/Review/lib/WebService.pm @@ -110,7 +110,7 @@ sub flag_activity { $match_criteria{type_id} = [map { $_->id } @$flag_types]; } - for my $user_field (qw( requestee setter )) { + foreach my $user_field (qw( requestee setter )) { if (my $user_name = $params->{$user_field}) { my $user = Bugzilla::User->check({ name => $user_name, cache => 1, _error => 'invalid_username' }); @@ -118,6 +118,12 @@ sub flag_activity { } } + foreach my $field (qw( bug_id status )) { + if (exists $params->{$field}) { + $match_criteria{$field} = $params->{$field}; + } + } + ThrowCodeError('param_required', { param => 'limit', function => 'Review.flag_activity()' }) if defined $params->{offset} && !defined $params->{limit}; @@ -398,6 +404,10 @@ Note that searching by C<flag_id> is not reliable because when flags are removed =item C<type_name> (string) - the flag type name of a change +=item C<status> (string) - The flag's current status + +=item C<bug_id> (int) - The flag's bug id + =back =item B<Returns> |