Edgewall Software
Modify

Opened 16 years ago

Closed 15 years ago

Last modified 15 years ago

#8229 closed defect (fixed)

bugzilla2trac.py error on user conversion from Bugzilla < 2.16.7

Reported by: maarten.ter.huurne@… Owned by: maarten.ter.huurne@…
Priority: normal Milestone: 0.12
Component: contrib Version: devel
Severity: minor Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

In the bugzilla2trac.py script the variable "users" is defined in the block starting with "if BZ_VERSION ≥ 2167:". For older Bugzilla versions, the variable "users" is not defined. As a result, the "for user in users:" statement that follows the block fails.

As a workaround, I added "else: users = []" to the "if" statement. This produces an empty password file instead of an error. It is probably cleaner to put the entire user conversion code inside the Bugzilla version check, so the script will not report that the user's passwords have been converted when in fact they haven't.

By the way, perhaps 2.16.7 is a bit too strict: as a test I converted the users from a Bugzilla 2.16.4 database and the resulting htaccess file looks reasonable. I didn't try authenticating against the generated htaccess file, but the user names are all there and password hashes are present and unique.

I set the severity to "blocker" because the bug blocked our migration to Trac. Finding the workaround was very easy though, so we were only blocked for a couple of minutes, but someone who is not a (Python) programmer might get stuck. If "blocker" is not appropriate for a script from "contrib", please forgive my ignorance and set it to a different severity.

Attachments (1)

bugzilla2trac.diff (1.1 KB ) - added by maarten.ter.huurne@… 15 years ago.

Download all attachments as: .zip

Change History (6)

comment:4 by Christian Boos, 15 years ago

Keywords: needinfo added

Maarten, can you write a patch with the changes you did?

by maarten.ter.huurne@…, 15 years ago

Attachment: bugzilla2trac.diff added

comment:5 by maarten.ter.huurne@…, 15 years ago

As I noted in the original description, the changes in the patch prevent the script from crashing, but for Bugzilla versions before 2.16.4 the script will report that the users were converted while that is not actually the case.

comment:6 by Christian Boos, 15 years ago

Keywords: needinfo removed
Milestone: 0.12.1

Yes, maybe outputting a warning before the users = () line would do.

Thanks for the patch!

comment:7 by Christian Boos, 15 years ago

Component: ticket systemcontrib
Milestone: next-minor-0.12.x0.12
Resolution: fixed
Severity: blockerminor
Status: newclosed

Forgot to apply it, done now [9298].

comment:8 by Christian Boos, 15 years ago

Owner: set to maarten.ter.huurne@…

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain maarten.ter.huurne@….
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from maarten.ter.huurne@… 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.