Edgewall Software
Modify

Opened 17 years ago

Closed 17 years ago

Last modified 17 years ago

#4724 closed defect (fixed)

Version of bugzilla2trac.py that works with Bugzilla 2.22 and trac 0.10.3-1

Reported by: bstandefer at digg dot com Owned by: Christopher Lenz
Priority: normal Milestone: 0.10.5
Component: admin/console Version: 0.10.4
Severity: normal Keywords: bugzilla2trac import
Cc: trac-ticket-4724@… Branch:
Release Notes:
API Changes:
Internal Changes:

Description

I could not get bugzilla2trac.py to work with these versions. I was getting an error saying that the time (which was null) was already inserted into the database, which required unique values of time (why?). Anyway, I messed with the time objects a bit, and was able to import data from Bugzilla 2.22 into trac 0.10.3-1. I have seen people post about this problem, but no solution. I have not verified that this fix is backwards compatible or even compatible with any other versions, but I do not see why it would not be.

Attachments (2)

bugzilla2trac.py (32.2 KB ) - added by bstandefer at digg dot com 17 years ago.
updated bugzilla2trac.py that works with Bugzilla 2.22 and trac 0.10.3-1
bugzilla2trac.py-patch (14.7 KB ) - added by quasistoic 17 years ago.
Patch intended to be applied to r3544

Download all attachments as: .zip

Change History (10)

by bstandefer at digg dot com, 17 years ago

Attachment: bugzilla2trac.py added

updated bugzilla2trac.py that works with Bugzilla 2.22 and trac 0.10.3-1

comment:1 by Christian Boos, 17 years ago

Keywords: bugzilla2trac added; bugzilla removed
Milestone: none

This patch eventually supersedes #3213, to be checked.

comment:2 by Christian Boos, 17 years ago

This patch also contains the patch provided in #3818.

#4467 has also be marked as duplicate of this one.

comment:3 by leo, 17 years ago

I believe you need to make one more change to get it to work, I'm not sure if its just a newer version of MySQLdb or what, but I needed to change line 412 to:

filedata = StringIO.StringIO(athedata)

athedata already came back as a 'str' so didn't have a tostring() method.

Python 2.4, MySQL 5.0.41, MySQLdb 1.2.2

comment:4 by leo, 17 years ago

er, should be:

        filedata = StringIO.StringIO(a['thedata'])

by quasistoic, 17 years ago

Attachment: bugzilla2trac.py-patch added

Patch intended to be applied to r3544

comment:5 by quasistoic, 17 years ago

Cc: trac-ticket-4724@… added
Version: 0.10.30.10.4

The patch I added rolls in changes

  1. by asmodai on #3213
  2. by Norman on #3818
  3. by myself @@ -531,9 +534,14 @@
  4. by myself, also, normalizing tabs to spaces and getting rid of unnecessary whitespace on blank lines (these make the patch noisy, but offer a slight improvement in the end)

I did not include any of the changes proffered by bstandefer because, well, I didn't see the point of many of them, e.g. adding a random number between 1 and 900 to ticket numbers. I'll leave it up to whoever resolves this bug to evaluate bstandefer's changes.

For the record, I was using this script to move from Bugzilla 2.2.2 to Trac 0.10.4.

comment:6 by Christian Boos, 17 years ago

Milestone: not applicable0.10.5
Resolution: fixed
Status: newclosed

Thanks for the patch. That script is not maintained actively by the TracTeam, however it's often presented as a starting point for rolling your own migration script.

It won't hurt if we integrate a more up-to-date version of the script and I take your word that it worked for you ;-)

Patch applied in r4639 (trunk) and r4640 (0.10-stable).

comment:7 by Christian Boos, 17 years ago

oops, Patch applied in r5639 (trunk) and r5640 (0.10-stable). of course.

comment:8 by quasistoic, 17 years ago

Aww, sweet! Glad I could help.

The script as packaged certainly was a great starting point. There wasn't too much I needed to do to get it working for me, and had I wanted to do so, I could have easily extended it because everyone who's worked on it did a great job keeping things legible.

I'm really enjoying Trac so far. It's a much more complete development management solution than Bugzilla on its own, and usability++!

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Christopher Lenz.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Christopher Lenz to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.