summaryrefslogtreecommitdiffstats
path: root/extensions
diff options
context:
space:
mode:
authorByron Jones <glob@mozilla.com>2015-03-09 07:40:38 +0100
committerByron Jones <glob@mozilla.com>2015-03-09 07:40:38 +0100
commit77ef1abbcc12440cfb2c1af271467e9e14b388ba (patch)
tree0fbdb95d3a353de04dcf1dcf3b34428ad816f71b /extensions
parent1049c71f1ae6ed9404501675b1faf5d92ead05a0 (diff)
downloadbugzilla-77ef1abbcc12440cfb2c1af271467e9e14b388ba.tar.gz
bugzilla-77ef1abbcc12440cfb2c1af271467e9e14b388ba.tar.xz
Bug 1140234: extend review/flag_activity to allow filtering by status and bug_id
Diffstat (limited to 'extensions')
-rw-r--r--extensions/Review/lib/WebService.pm12
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>