diff options
author | Byron Jones <bjones@mozilla.com> | 2013-07-26 08:02:34 +0200 |
---|---|---|
committer | Byron Jones <bjones@mozilla.com> | 2013-07-26 08:02:34 +0200 |
commit | b0cd974e5c57ec5781053699fb9b2ffc5697be4c (patch) | |
tree | 714407286014774a15f96ef87851740b02378ec6 /extensions/Review/Extension.pm | |
parent | d780cce675a9fbc7eaa0872315f1761a9de79be8 (diff) | |
download | bugzilla-b0cd974e5c57ec5781053699fb9b2ffc5697be4c.tar.gz bugzilla-b0cd974e5c57ec5781053699fb9b2ffc5697be4c.tar.xz |
Bug 897473: exclude users from the review suggestions list who have "unavailable" or "PTO" in their real name
Diffstat (limited to 'extensions/Review/Extension.pm')
-rw-r--r-- | extensions/Review/Extension.pm | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/extensions/Review/Extension.pm b/extensions/Review/Extension.pm index d4e9ae761..51755ca2c 100644 --- a/extensions/Review/Extension.pm +++ b/extensions/Review/Extension.pm @@ -18,6 +18,8 @@ use Bugzilla::Error; use Bugzilla::User; use Bugzilla::Util qw(clean_text); +use constant UNAVAILABLE_RE => qr/\b(?:unavailable|pto)\b/i; + # # monkey-patched methods # @@ -58,7 +60,9 @@ sub _reviewers_objs { # so we have to reorder the list my $users = Bugzilla::User->new_from_list($user_ids); my %user_map = map { $_->id => $_ } @$users; - my @reviewers = map { $user_map{$_} } @$user_ids; + my @reviewers = + grep { $_->name !~ UNAVAILABLE_RE } + map { $user_map{$_} } @$user_ids; $object->{reviewers} = \@reviewers; } return $object->{reviewers}; |