summaryrefslogtreecommitdiffstats
path: root/extensions
diff options
context:
space:
mode:
authorDavid Lawrence <dkl@redhat.com>2014-06-19 20:46:56 +0200
committerDavid Lawrence <dkl@redhat.com>2014-06-19 20:46:56 +0200
commit28c28019236ab11342415043ade727e102f1424f (patch)
treea59176d43fdf499e9b02d24bfd6f07bdb4a97b46 /extensions
parent0f3bf0707aeab92635d41f8751397ba53997d7d0 (diff)
downloadbugzilla-28c28019236ab11342415043ade727e102f1424f.tar.gz
bugzilla-28c28019236ab11342415043ade727e102f1424f.tar.xz
Bug 1027060 - bug.id is a string if the response includes comments
r=glob
Diffstat (limited to 'extensions')
-rw-r--r--extensions/BzAPI/lib/Util.pm8
1 files 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));