From 084bca3f0c2e2825ce1c65f8d866eeb4cc3bdc90 Mon Sep 17 00:00:00 2001 From: David Lawrence Date: Wed, 5 Oct 2011 17:28:21 -0400 Subject: More 4.2 porting fixes --- extensions/ComponentWatching/Extension.pm | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'extensions/ComponentWatching') diff --git a/extensions/ComponentWatching/Extension.pm b/extensions/ComponentWatching/Extension.pm index d73ce47cd..d39d9cd55 100644 --- a/extensions/ComponentWatching/Extension.pm +++ b/extensions/ComponentWatching/Extension.pm @@ -165,9 +165,10 @@ sub bugmail_recipients { # we need the product to process the component, so scan for that first my $product; foreach my $ra (@$diffs) { - my (undef, undef, undef, undef, $old, $new, undef, $field) = @$ra; - if ($field eq 'product') { - $product = Bugzilla::Product->new({ name => $old }); + next if !(exists $ra->{'old'} + && exists $ra->{'field_name'}); + if ($ra->{'field_name'} eq 'product') { + $product = Bugzilla::Product->new({ name => $ra->{'old'} }); $oldProductId = $product->id; } } @@ -175,9 +176,10 @@ sub bugmail_recipients { $product = Bugzilla::Product->new($oldProductId); } foreach my $ra (@$diffs) { - my (undef, undef, undef, undef, $old, $new, undef, $field) = @$ra; - if ($field eq 'component') { - my $component = Bugzilla::Component->new({ name => $old, product => $product }); + next if !(exists $ra->{'old'} + && exists $ra->{'field_name'}); + if ($ra->{'field_name'} eq 'component') { + my $component = Bugzilla::Component->new({ name => $ra->{'old'}, product => $product }); $oldComponentId = $component->id; } } -- cgit v1.2.3-24-g4f1b