diff options
-rw-r--r-- | extensions/BMO/Extension.pm | 12 | ||||
-rw-r--r-- | extensions/ComponentWatching/Extension.pm | 14 |
2 files changed, 14 insertions, 12 deletions
diff --git a/extensions/BMO/Extension.pm b/extensions/BMO/Extension.pm index c800ade3d..1bb83c977 100644 --- a/extensions/BMO/Extension.pm +++ b/extensions/BMO/Extension.pm @@ -263,12 +263,12 @@ sub bugmail_recipients { if (@$diffs) { # Changed bug foreach my $ref (@$diffs) { - my ($who, $whoname, $what, $when, - $old, $new, $attachid, $fieldname) = (@$ref); - - if ($fieldname eq "bug_group") { - _cc_if_special_group($old, $recipients); - _cc_if_special_group($new, $recipients); + next if !(exists $ref->{'new'} + && exists $ref->{'old'} + && exists $ref->{'field_name'}); + if ($ref->{'field_name'} eq "bug_group") { + _cc_if_special_group($ref->{'old'}, $recipients); + _cc_if_special_group($ref->{'new'}, $recipients); } } } else { 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; } } |