diff options
Diffstat (limited to 'extensions/BMO/lib/Reports')
-rw-r--r-- | extensions/BMO/lib/Reports/Recruiting.pm | 13 |
1 files changed, 8 insertions, 5 deletions
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; |