Bugzilla import wizard via script or java?
I'm doing the Bugzilla importing from the File -> Import wizard and things work okay. However, it goes quite slowly because I must do them one bug at a time, since they are not sequential bug numbers nor do they have just a single release value.
Is there a script or java API that I can pass all the relevant data (for example, within Java, I can invoke the program via batch passing in the Bugzilla number, my username/pw, the attribute mapping.xml, etc).
Thanks,
Susan
Is there a script or java API that I can pass all the relevant data (for example, within Java, I can invoke the program via batch passing in the Bugzilla number, my username/pw, the attribute mapping.xml, etc).
Thanks,
Susan
2 answers
Susan, have you tried to Plug-In-Spy (SHIFT-ALT-F1) the import wizard in Eclipse, that should give you an idea of the API it uses.
Comments
It is also possible to zip many work item representations into a single zip file. I've done this with zips of several to thousands of work items.
For example here's a listing of part of one such zip:
3367 07-09-2012 14:45 Defects/27544.xml
0 07-09-2012 14:45 Defects/27544/
22531 09-23-2011 02:00 Defects/27544/BUG_27544_1-BANNER.gif
13478 09-23-2011 02:10 Defects/27544/BUG_27544_2-USER SPECIFIED.gif
1492 07-09-2012 14:45 Defects/27589.xml
0 07-09-2012 14:45 Defects/27589/
21346 09-29-2011 03:01 Defects/27589/BUG_27589_Concatenation.jpg
2179 07-09-2012 14:45 Defects/27636.xml
3902 07-09-2012 14:45 Defects/300501.xml
7092 07-09-2012 14:45 Defects/404434.xml
0 07-09-2012 14:45 Defects/404434/
357753 03-07-2007 15:40 Defects/404434/BUG_404434_BUG_404434_vulnanalysisSPCon.zip
The .xml files just under Defects will be imported as work items while directories named for the same 'ID' represent attachments.
There is a (or was) a BugzillaCommandLineClass which I used to leverage (in the v2 days) to automate work item creation upon some external event.
Kevin
For example here's a listing of part of one such zip:
3367 07-09-2012 14:45 Defects/27544.xml
0 07-09-2012 14:45 Defects/27544/
22531 09-23-2011 02:00 Defects/27544/BUG_27544_1-BANNER.gif
13478 09-23-2011 02:10 Defects/27544/BUG_27544_2-USER SPECIFIED.gif
1492 07-09-2012 14:45 Defects/27589.xml
0 07-09-2012 14:45 Defects/27589/
21346 09-29-2011 03:01 Defects/27589/BUG_27589_Concatenation.jpg
2179 07-09-2012 14:45 Defects/27636.xml
3902 07-09-2012 14:45 Defects/300501.xml
7092 07-09-2012 14:45 Defects/404434.xml
0 07-09-2012 14:45 Defects/404434/
357753 03-07-2007 15:40 Defects/404434/BUG_404434_BUG_404434_vulnanalysisSPCon.zip
The .xml files just under Defects will be imported as work items while directories named for the same 'ID' represent attachments.
There is a (or was) a BugzillaCommandLineClass which I used to leverage (in the v2 days) to automate work item creation upon some external event.
Kevin