On Mon, 2010-07-05 at 14:58 +0100, Cooke, Mark wrote:
>
> > On Mon, 2010-07-05 at 14:35 +0100, Cooke, Mark wrote:
> > > > -----Original Message-----
> > > > From: [email protected] On Behalf Of Roger Oberholtzer
> > > > Sent: 05 July 2010 13:59
> > > > To: [email protected]
> > > > Subject: [Trac] Bugzilla -> Trac
> > > >
> > > > I want to move bugs from Bugzilla to Trac. We have decided
> > > > that Bugzilla is to heavy for our uses. Trac has won out.
> > > >
> > > > I know there is a plugin for trac to add tickets via a
> > csv file. So I
> > > > have two question for the list:
> > > >
> > > > 1. How would one deal with the fact that there are surely commas
> > > > in the bugzilla text? The import plugin suggested an excel sheet
> > > > could also be used. But we are a Linux shop...
> > > >
> > > > 2. How to get Bugzilla to even make a csv listing of the data?
> > > >
> > > > Failing all else, we will move them by hand. But I am
> > guessing there
> > > > is an easier way. As we will do this once, a fancy solution is not
> > > > needed :)
> > > >
> > > > I guess I could access the bugzilla database and get it to list
> > > > things, format these items, and somehow import it into Trac. But
> > > > surely this has been done before...
> > > >
> > > > --
> > > > Roger Oberholtzer
> > > >
> > > There is a bugzilla2trac.py script which I have used
> > successfully (with
> > > modifications) to import bz tickets to trac 0.11.7 series.
> > There are a
> > > number of open tickets against this script and it depends on what
> > > version of bz you have etc but it worked well for us. It
> > even lets you
> > > translate a number of things (such as user names) in the process.
> > >
> > > As a starter you can find it in the contrib sub in the tree:
> > > http://trac.edgewall.org/browser/trunk/contrib
> > >
> > > ..but I would check out all the related tickets and patches first!
> >
> > -----Original Message-----
> > From: [email protected] On Behalf Of Roger Oberholtzer
> > Sent: 05 July 2010 14:51
> > To: [email protected]
> > Subject: RE: [Trac] Bugzilla -> Trac
> >
> > I will try this. It is exactly what I had in mined. Our
> > soon-to-be-ex-bugzilla is 3.2.2, which is newer than the script
> > references. So I will have to see what that might mean.
> >
> > I plan on making a dummy trac env to see what happens. If it
> > looks good,
> > I will then try on a copy of a real trac with no users logged in.
> >
> > Looks like I have a bit of fun ahead.
> >
> > Thanks for the pointer.
> >
> > --
> > Roger Oberholtzer
> >
> I have not kept up with developments to the script since I made my
> changes but will try to summarize what I had to change to get the
> version working that I used. For starters though, this is the place to
> look up the BZ schema, you can even diff between schema versions to
> highlight what has changed:
>
> http://www.ravenbrook.com/project/p4dti/tool/cgi/bugzilla-schema/
>
> ~ mark c
>
I have tried to use this script, but have a few issues...
1. I am using bugzilla 3.2.2. I do not see how to specify this in the
script. All the examples are for things like 3.01.4, which results in a
4 digit number. As I see tests in the script like version > 2100, I
obviously need a 4 digit number. The suggestion in the script that I
could find this value in globals.pl didn't help, as there is no such
file. I looked at the files I do have and did not see this...
Anyway, I went ahead with this value as "3022". When I did that, I get
this far:
Using Bugzilla v3022 schema.
Bugzilla MySQL('bugs':'localhost':'bugs':'******'): connecting...
Trac SQLite('/vol1/trac/dummy/rsoft'): connecting...
0. Filtering products...
Using products accelerometer adScope.tcl AIES app: crack app: diag app:
distance app: evenness app: geometry app: mpd app: profile app: rutdepth app:
sampler app: texture app: wellness app: wpe Applanix POSLV calacc calcps
calgeom calgyro calibrate.tcl calinc calpal calpuls calwpe change checkcam
checkcom checkdev checkdist checkdpavue checknmea checkpic checkraw checkrut
checkstream cleanupHiway Collected file organization convert2stream datastore
Deactivating a transducer distance Distance ANTS DM dPAVUE images ejboc.tcl
evenness faulting General post-processing geometry Gizmoids gyroscope hiway IAM
imagestore inclinometer Installing on openSUSE Linux ISM JBOC.tcl JPEG2000
capture system laser laserScope.tcl liblicense libmca librsoft lprofile Main
computer MinGW MM mm2rd mm2sc moc mpd ncdevice odometer operatorinfo Other AIES
component Other ANTS component Other dPAVUE component Other general office
hardware Other general vehicle hardware Other SPC2/FIFO hardware PAM pds
postmortem ravelling Removable SATA hard disks rmcd rst2 rst2finland
rst2holland rst2rcd rst2rmt rst2scanner rst2tracs rst2zeb rutdepth showrut.tcl
SM snoop.tcl SPC2/FIFO sub-rack SpotOn data bus provider sumthing supervisor
TestProduct texture TFM TM tprofile vcrcmd vvxml water WMM xcheck ylist
1. Import severities...
inserting severity 'blocker' - '1'
inserting severity 'critical' - '2'
inserting severity 'major' - '3'
inserting severity 'normal' - '4'
inserting severity 'minor' - '5'
inserting severity 'trivial' - '6'
2. Import components...
inserting component 'documentation', owner 'jrmsm'
inserting component 'program', owner 'roger'
inserting component 'libaies', owner 'roger'
inserting component 'documentation', owner 'roger'
Traceback (most recent call last):
File "/tmp/bugzilla2trac.py", line 1006, in <module>
main()
File "/tmp/bugzilla2trac.py", line 1003, in main
convert(BZ_DB, BZ_HOST, BZ_USER, BZ_PASSWORD, TRAC_ENV, TRAC_CLEAN)
File "/tmp/bugzilla2trac.py", line 594, in convert
trac.setComponentList(components, 'name')
File "/tmp/bugzilla2trac.py", line 304, in setComponentList
comp['owner'].encode('utf-8')))
File "build/bdist.linux-i686/egg/trac/db/util.py", line 65, in execute
File "build/bdist.linux-i686/egg/trac/db/sqlite_backend.py", line 78, in
execute
File "build/bdist.linux-i686/egg/trac/db/sqlite_backend.py", line 56, in
execute
File "build/bdist.linux-i686/egg/trac/db/sqlite_backend.py", line 48, in
_rollback_on_error
sqlite3.IntegrityError: column name is not unique
So, it finds the database, reads some things, but then fails. I am out
of my depth here...
--
Roger Oberholtzer
--
You received this message because you are subscribed to the Google Groups "Trac
Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/trac-users?hl=en.