Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bugzilla 2.2x: Can I export all of my bugs into XML (bug-centric XML; no table-centric)

649 views
Skip to first unread message

danjh...@gmail.com

unread,
May 21, 2007, 12:19:51 PM5/21/07
to
Background:
* to migrate a customized 2.20 to 3.0 bugzilla.
* remove the customizations in our new server (drop customized fields
since no one really uses them)
* restructure our classifications, layouts, and components

So basically, I'm in the middle of a data migration as well as an
upgrade.
I'm trying to find the best way to migrate the old data to the new. My
assumption that I'm operating with is that
the customizations are forcing me to migrate the data just like I
would if I were coming from a different bug tracking application.

I don't think I like the idea of dumping MySQL to XML. That is a table-
centric dump. I'd rather have a MR-centric dump of XML data.

I'm currently considering dumping the bugs to CSV and translating them
to XML for a subsequent XSLT transformation to XML and then import.

Main Question:
But I can't help but wonder: Isn't there a way to dump ALL of my 2.20
bugs into an XML file? I'm thinking about the same format that I see
when I append "&ctype=xml" to a bug's URL. But that's only one bug.

Thanks
dj

Frédéric Buclin

unread,
May 21, 2007, 1:52:22 PM5/21/07
to
> * remove the customizations in our new server (drop customized fields
> since no one really uses them)

> But I can't help but wonder: Isn't there a way to dump ALL of my 2.20


> bugs into an XML file? I'm thinking about the same format that I see
> when I append "&ctype=xml" to a bug's URL. But that's only one bug.

If you remove all customizations, what prevents you from upgrading using
the usual way, i.e running ./checksetup.pl?

About having all bugs in XML format, you can do a query which returns
all bugs (may be a large list, though) and then you have to hack the URL
a bit (if you were using Bugzilla 2.22 or newer, no hack would be
required, all you would need is to click the "XML" button at the end of
the list):
1) at the end of the list, click the "Long format" button. This will
display all bugs in HTML.
2) Hack the URL (e.g. using the 'UrlParams' Firefox extension): remove
the format=multiple attribute and add ctype=xml. This will give you what
you want.

I'm not saying that's the best way to do it. Maybe someone else has a
better alternative. :)

When you have the list in the XML format, save it into a file and use
importxml.pl in Bugzilla 3.0 to import all your data in your new DB. But
still, doing a normal upgrade using checksetup.pl is still the best way
to go.

LpSolit

danj...@gmail.com

unread,
May 21, 2007, 2:58:42 PM5/21/07
to
Excellent! This worked great.

WRT why I didn't upgrade normally since I'm dropping the
customizations...
I'm testing the migration on my own linux box and I'm having troubles
loading the 2.20 sql dump into a clean db.
The mysql error messages weren't helpful so I though I'd back up and
try another way. (Sometimes you
never know how close you are to success before deciding to try another
way :) )

Thanks!


Joe23

unread,
May 21, 2007, 3:44:43 PM5/21/07
to support-...@lists.mozilla.org
Would this work on 2.18? I have tried it but cannot find the "format="
field and if I add ctype=xml, it does not change anything.

If this does not work on 2.18, is there any way of exporting all test cases
from 2.18 so I can import into 3.0? I have DB issues that do prevent me
from upgrading the standard way.

Thanks!

Joe

LpSolit
_______________________________________________
support-bugzilla mailing list
support-...@lists.mozilla.org
https://lists.mozilla.org/listinfo/support-bugzilla
PLEASE put support-...@lists.mozilla.org in the To: field when you
reply.

danj...@gmail.com

unread,
May 21, 2007, 5:21:45 PM5/21/07
to
If it helps, here are more detailed steps to the UrlParams procedure
(I entered the the data in the wrong fields at first and I thought it
wasn't working for me).

1) Installed the UrlParams' Firefox extension; restarted Firefox
2) Created a search report in bugzilla
3) selected "Long Format"
4) In Firefox selected View->Sidebar->UrlParams
5) Unchecked the checkbox next to "Format"
6) Scrolled down to bottom of UrlParms; entered "ctype" in first empty
text box, then entered "xml" in the next empty text box.

This doesn't work?
-dj

Gregary Hendricks

unread,
May 23, 2007, 2:49:26 PM5/23/07
to support-...@lists.mozilla.org
The XML button on a buglist wasn't added until 2.22. I can't remember if
I needed to change anything as for ctype in the code to make it work. I
believe you could already export a single bug and all you need to do
instead is pass the list of bugs. Unfortunately this is limited to a
rather small set of bugs since the URL can only hold 4k.

The url looks something like: show_bug.cgi?bug_id=1&bug_id=2&ctype=xml
Buglist cheats by turning all of these individual bugs into hidden form
fields so it can be passed on a POST.

Greg

0 new messages