diff options
author | David Lawrence <dlawrence@mozilla.com> | 2011-10-05 23:28:21 +0200 |
---|---|---|
committer | David Lawrence <dlawrence@mozilla.com> | 2011-10-05 23:28:21 +0200 |
commit | 084bca3f0c2e2825ce1c65f8d866eeb4cc3bdc90 (patch) | |
tree | 42b62ba9ff25f8c34de666eca0a6fc0b43111dab /extensions/ComponentWatching | |
parent | 1d44809edc5e460f5c5035ebb272f1fe776465cc (diff) | |
download | bugzilla-084bca3f0c2e2825ce1c65f8d866eeb4cc3bdc90.tar.gz bugzilla-084bca3f0c2e2825ce1c65f8d866eeb4cc3bdc90.tar.xz |
More 4.2 porting fixes
Diffstat (limited to 'extensions/ComponentWatching')
-rw-r--r-- | extensions/ComponentWatching/Extension.pm | 14 |
1 files changed, 8 insertions, 6 deletions
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; } } |