Edgewall Software

Opened 12 years ago

Last modified 4 years ago

#10504 closed defect

[PATCH] bugzilla2trac.py: import Bugzilla version 4.0.1 — at Initial Version

Reported by: tapomay.dey@… Owned by:
Priority: normal Milestone:
Component: contrib Version: 0.11.1
Severity: normal Keywords: verify, patch, bugzilla2trac
Cc: Branch:
Release Notes:
API Changes:

bugzilla2trac.py. No change in API. Only implementation changed.

Internal Changes:

Description

Creating new ticket in lines of http://trac.edgewall.org/ticket/7333 as that one is pretty old. Managed to import my bugs from Bugzilla version 4.0.1 into Trac version 0.11.1. Changes in the bugzilla2trac.py:

  1. BZ_VERSION = 4010

Fixed selection of correct query in TracDatabase.getFieldName "cursor.execute("SELECT * FROM fielddefs WHERE id = %s",(fieldid))" is correct.

  1. In method TracDatabase.addAttachment

Insert following code to change : TracDatabase.env.path to absolute path mod_env = os.path.abspath(self.env.path). self.env.path = mod_env Before doing "attachment = Attachment(self.env, 'ticket', id)"

This fixed an assertion error in attachment.py: " assert commonprefix == attachments_dir "

System Information: Trac: 0.11.1 Python: 2.5.2 (r252:60911, Jan 24 2010, 17:44:40) [GCC 4.3.2] setuptools: 0.6c8 SQLite: 3.5.9 pysqlite: 2.4.1 Genshi: 0.5.1 Subversion: 1.5.1 (r32289) jQuery: 1.2.6

P.S: Please note that I have no insight into trac codebase nor am I accustomed to python. The changes to the script are completely symptom-solution based.

Change History (0)

Note: See TracTickets for help on using tickets.