Saturday, March 15, 2008

The other day I was looking into moving development bugs from one bug system over to Bugzilla. Someone in my group pointed out that Bugzilla had an XMLRPC Web service exposed at:

http://bugzilla-address/xmlrpc.cgi.

The current bug system had a feature that would export the bugs into XML data. I exported the bug data, moved the XML file to my local machine, and opened the Groovy Console. Let's check out how simple things can be.

That is it. It took me about 30 minutes to parse the XML file and loop through each node with Groovy. I spent about an hour finding out that HTTPClient was also needed, I originally started working with Groovy's XMLRPC library. You need to have the appropriate Apache XMLRPC Client libraries in place in your Groovy lib directory. I ran this from the Groovy Console and it did exactly what I needed it to do. The Groovy file is available for download .