From: mkanat%bugzilla.org <> Date: Mon, 26 Jan 2009 21:57:28 +0000 (+0000) Subject: Bug 474997: Make update_see_also actually return the right thing X-Git-Tag: bugzilla-3.3.2~21 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=503f732b1c64e4c950f747a07dc6cdd056a520ff;p=thirdparty%2Fbugzilla.git Bug 474997: Make update_see_also actually return the right thing Patch by Max Kanat-Alexander r=dkl, a=mkanat --- diff --git a/Bugzilla/WebService/Bug.pm b/Bugzilla/WebService/Bug.pm index 21645af3d6..ffeab2ce1d 100755 --- a/Bugzilla/WebService/Bug.pm +++ b/Bugzilla/WebService/Bug.pm @@ -375,14 +375,14 @@ sub update_see_also { foreach my $bug (@bugs) { my $change = $bug->update(); if (my $see_also = $change->{see_also}) { - $changes{$bug->id} = { + $changes{$bug->id}->{see_also} = { removed => [split(', ', $see_also->[0])], added => [split(', ', $see_also->[1])], }; } else { # We still want a changes entry, for API consistency. - $changes{$bug->id} = { added => [], removed => [] }; + $changes{$bug->id}->{see_also} = { added => [], removed => [] }; } Bugzilla::BugMail::Send($bug->id, { changer => $user->login }); @@ -1372,12 +1372,16 @@ bug ids 1 and 2: { changes => { 1 => { - added => (an array of bug URLs), - removed => (an array of bug URLs), + see_also => { + added => (an array of bug URLs), + removed => (an array of bug URLs), + } }, 2 => { - added => (an array of bug URLs), - removed => (an array of bug URLs), + see_also => { + added => (an array of bug URLs), + removed => (an array of bug URLs), + } } } }