Description of problem: I've tested rhts-wizard [1] with the updated XML-RPC interface at bz-web2-test.devel.redhat.com/xmlrpc.cgi The script failed with: File "./rhts-wizard", line 1544, in getDescription return self.bug.longdescs[0]["body"] KeyError: 'body' Seems the "body" attribute has been renamed to "thetext" for comments: longdescs[0]["body"] -> to longdescs[0]["thetext"] Is this change expected? Will Bugzilla support the "body" attribute to be backward compatible? Or shall I update the wizard? Version-Release number of selected component (if applicable): version 3.6+ [1] https://wiki.test.redhat.com/BaseOs/Projects/RhtsWizard
Hi Petr, yes you are right the body attribute has been renamed to "thetext" so basically this the new attributes of the longdescs field: 'longdescs' => [ { 'count' => '0', 'thetext' => '' 'author' => { }, 'bug_id' => , 'email' => 'work_time' => , 'comment_id' => , 'who' => , 'bug_when' => , 'isprivate' => , 'already_wrapped' => , 'type' => }, Regards, Noura
(In reply to comment #1) > Hi Petr, > > yes you are right the body attribute has been renamed to "thetext" so basically Petr, which method are you using to get the bug details? Bug.get and Bug.comments or are you using bugzilla.getBug? If you are using the latter, then maybe consider updating your scripts to use the former two calls as they are the upstream API and less likely to change going forward. Noura, can you update the bugzilla.* and RedHat.* methods to change 'thetext' to 'body' before returning the data? This change is going to affect other people as well I am sure. Dave
Hi Dave, the only functions i found that return thetext are RedHat.getBug and bugzilla.getBug I changed that to be body instead. with the upstream API Bug.comments returns thetext but we will leave that as you mentioned to be constant with the upstream API. the patch has been applied to bz-web2, Petr please run your test again and see if it has been fixed. also committed to svn. Cheers, Noura
(In reply to comment #3) > the only functions i found that return thetext are RedHat.getBug and > bugzilla.getBug I changed that to be body instead. Any methods in extensions/RedHat/lib/WebService/* that access and return $bug->comments will need to have the key 'thetext' converted to 'body'. $bug->comments replaces $bug->longdescs in 3.4. If the places you found were the only ones then we should be good. > with the upstream API Bug.comments returns thetext but we will leave that as > you mentioned to be constant with the upstream API. Yes the upstream API will remain 'thetext'. Petr, if this works for you then feel free to close this bug. Dave
Verified, works fine now. Thanks for fixing! > Petr, which method are you using to get the bug details? Bug.get > and Bug.comments or are you using bugzilla.getBug? > > If you are using the latter, then maybe consider updating your > scripts to use the former two calls as they are the upstream API > and less likely to change going forward. I'm using python-bugzilla's method getbug() which seems to be implemented using the old interface: #---- Methods for reading bugs and bug info def _getbug(self,id): '''Return a dict of full bug info for the given bug id''' return self._proxy.bugzilla.getBug(id) So I guess I should file a bug against python-bugzilla, right?
(In reply to comment #5) > Verified, works fine now. Thanks for fixing! Thanks for verifying. > > > Petr, which method are you using to get the bug details? Bug.get > > and Bug.comments or are you using bugzilla.getBug? > > > > If you are using the latter, then maybe consider updating your > > scripts to use the former two calls as they are the upstream API > > and less likely to change going forward. > > I'm using python-bugzilla's method getbug() which seems to be > implemented using the old interface: > > #---- Methods for reading bugs and bug info > > def _getbug(self,id): > '''Return a dict of full bug info for the given bug id''' > return self._proxy.bugzilla.getBug(id) > > So I guess I should file a bug against python-bugzilla, right? Yep. I think the python-bugzilla author will be the one to do the changes. Dave