From 28c28019236ab11342415043ade727e102f1424f Mon Sep 17 00:00:00 2001 From: David Lawrence Date: Thu, 19 Jun 2014 18:46:56 +0000 Subject: Bug 1027060 - bug.id is a string if the response includes comments r=glob --- extensions/BzAPI/lib/Util.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/extensions/BzAPI/lib/Util.pm b/extensions/BzAPI/lib/Util.pm index 4675b3236..8ea039db5 100644 --- a/extensions/BzAPI/lib/Util.pm +++ b/extensions/BzAPI/lib/Util.pm @@ -110,7 +110,7 @@ sub fix_bug { # Attachment metadata is included by default but not data if (filter_wants_nocache($params, 'attachments')) { - my $attachment_params = { ids => $data->{id} }; + my $attachment_params = { ids => $bug->id }; if (!filter_wants_nocache($params, 'data', 'extra', 'attachments') && !$params->{attachmentdata}) { @@ -132,8 +132,8 @@ sub fix_bug { # Comments if (filter_wants_nocache($params, 'comments', 'extra', 'comments')) { - my $comments = $rpc->comments({ ids => $data->{id} }); - $comments = $comments->{bugs}->{$data->{id}}->{comments}; + my $comments = $rpc->comments({ ids => $bug->id }); + $comments = $comments->{bugs}->{$bug->id}->{comments}; my @new_comments; foreach my $comment (@$comments) { $comment = fix_comment($comment); @@ -144,7 +144,7 @@ sub fix_bug { # History if (filter_wants_nocache($params, 'history', 'extra', 'history')) { - my $history = $rpc->history({ ids => [ $data->{id} ] }); + my $history = $rpc->history({ ids => [ $bug->id ] }); my @new_history; foreach my $changeset (@{ $history->{bugs}->[0]->{history} }) { push(@new_history, fix_changeset($changeset, $bug)); -- cgit v1.2.3-24-g4f1b