From 14a2a956773d0ff7a0b8ecdf246f92d866f21d03 Mon Sep 17 00:00:00 2001 From: Ashish Vijayaram Date: Thu, 19 Dec 2013 10:56:44 +0800 Subject: Bug 951020: fix nagios check --- contrib/nagios_blocker_checker.pl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'contrib') diff --git a/contrib/nagios_blocker_checker.pl b/contrib/nagios_blocker_checker.pl index 85bcc84de..732878107 100755 --- a/contrib/nagios_blocker_checker.pl +++ b/contrib/nagios_blocker_checker.pl @@ -113,8 +113,9 @@ if ($config->{assignee}) { push @values, Bugzilla::User->check({ name => $config->{assignee} })->id; } elsif ($config->{component}) { $where = 'bugs.product_id = ? AND bugs.component_id = ? AND bugs.assigned_to = ?'; - push @values, Bugzilla::Product->check({ name => $config->{product} })->id; - push @values, Bugzilla::Component->check({ name => $config->{component} })->id; + my $product = Bugzilla::Product->check({ name => $config->{product} }); + push @values, $product->id; + push @values, Bugzilla::Component->check({ product => $product, name => $config->{component} })->id; push @values, Bugzilla::User->check({ name => $config->{unassigned} })->id; } else { $where = 'bugs.product_id = ? AND bugs.assigned_to = ?'; -- cgit v1.2.3-24-g4f1b