From 5f8b7d80c6d390d6eb135f8d8bb9f8662524a24b Mon Sep 17 00:00:00 2001 From: David Lawrence Date: Wed, 22 Jul 2015 16:00:02 +0800 Subject: Bug 1171605 - Intern Request Form --- extensions/BMO/lib/Reports/Recruiting.pm | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'extensions/BMO/lib') diff --git a/extensions/BMO/lib/Reports/Recruiting.pm b/extensions/BMO/lib/Reports/Recruiting.pm index 34d61b681..bd988d9b1 100644 --- a/extensions/BMO/lib/Reports/Recruiting.pm +++ b/extensions/BMO/lib/Reports/Recruiting.pm @@ -12,6 +12,7 @@ use warnings; use Bugzilla::Error; use Bugzilla::Bug; use Bugzilla::Product; +use Bugzilla::Component; sub report { my ($vars) = @_; @@ -22,18 +23,20 @@ sub report { action => 'run', object => 'recruiting_dashboard' }); - my $product = Bugzilla::Product->check({ name => 'Recruiting', cache => 1 }); + my $product = Bugzilla::Product->check({ name => 'Recruiting', cache => 1 }); + my $component = Bugzilla::Component->new({ product => $product, name => 'General', cache => 1 }); # find all open recruiting bugs my $bugs = Bugzilla::Bug->match({ - product_id => $product->id, - resolution => '', + product_id => $product->id, + component_id => $component->id, + resolution => '', }); # filter bugs based on visibility and re-bless $user->visible_bugs($bugs); $bugs = [ - map { bless($_, 'RecuritingBug') } + map { bless($_, 'RecruitingBug') } grep { $user->can_see_bug($_->id) } @$bugs ]; @@ -43,7 +46,7 @@ sub report { 1; -package RecuritingBug; +package RecruitingBug; use strict; use warnings; -- cgit v1.2.3-24-g4f1b