running the selenium/xmlrpc testsuite getBug and getBugSimple do not work as expected, they don't return the right output.
Created attachment 311227 [details] v1 fix for functions bugzilla.getBug and Bug.get Basically the function getBugSimple is fine ,, the problem was in bugzilla.getBug and Bug.get,, the problem was coming from the external bugzilla extension , as the extension was adding external_bugs object to the actual bug object as the following: 'external_bugs' => bless( { '_bug_obj' => $VAR1->{'log'}, 'bugs' => [ { 'is_bz' => undef, 'url' => 'http://gmome.bugzilla.org', 'bug_id' => '256', 'id' => '2', 'description' => 'kde blah', 'full_url' => undef } ] }, 'extensions::external_bugs::lib::ExternalBugs' ), and this failing the bug object to be returned in xml, looking in 2.18 in bugzilla.getBug we only return what is in {external_bugs}{bugs} from the above so i filtered that in the bug object and it was working fine after. the attached patch include: 1- fix for Bug.get as described above. 2- fix for bugzilla.getBug includes the above + returns all missing bug object info + deleting custom filed names with cf_* as we return it without the cf_* 3- deleted the get_activity function and its pod as it is replaced with get_history now. Please review when you can. Noura
Comment on attachment 311227 [details] v1 fix for functions bugzilla.getBug and Bug.get >Index: Bugzilla/WebService/Bug.pm >=================================================================== >+ $bug->{external_bugs} = $bug->{external_bugs}{bugs}; Please do not access the object as hash unless necessary. So instead do: $bug->{external_bugs} = $bug->external_bugs->{bugs}; The fields() sub in Bug.pm should add external_bugs as a valid class accessor so the above should work. >Index: extensions/compat_xmlrpc/code/webservice.pl >=================================================================== >+ $bug->{external_bugs} = $bug->{external_bugs}{bugs}; Same as above.
Created attachment 311358 [details] v2 fix functions bugzilla.getBug and Bug.get Thanks for the review Dave , here is another patch with the fix Noura
Comment on attachment 311358 [details] v2 fix functions bugzilla.getBug and Bug.get Looks good Noura. Assuming it tests ok then feel free to commit. Dave
Thanks for the review Dave, all committed to cvs now.
The changes have been pushed to partner-bugzilla.redhat.com and/or have been recorded in the Bugzilla migration pages on the Bugzilla 3 upgrade Wiki. Closing as NEXTRELEASE. Dave