Opened 13 years ago
Closed 5 years ago
#10504 closed defect (wontfix)
[PATCH] bugzilla2trac.py: import Bugzilla version 4.0.1
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | contrib | Version: | 0.11.1 |
Severity: | normal | Keywords: | verify, patch, bugzilla2trac |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description (last modified by )
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:
- BZ_VERSION = 4010
Fixed selection of correct query in TracDatabase.getFieldName "cursor.execute("SELECT * FROM fielddefs WHERE id = %s",(fieldid))" is correct.
- 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.
Attachments (2)
Change History (14)
comment:1 by , 13 years ago
Milestone: | not applicable |
---|
by , 13 years ago
Attachment: | bugzilla2py_0_11_1.diff added |
---|
svn Diff for bugzilla2trac.py changes w.r.t. trac-0.11.1
comment:2 by , 13 years ago
Please see attachment http://trac.edgewall.org/attachment/ticket/10504/bugzilla2py_0_11_1.diff
Is this what you meant by a patch. I followed http://trac.edgewall.org/wiki/TracDev/SubmittingPatches
by , 13 years ago
Attachment: | bugzilla2py_mysql_0_11_1.diff added |
---|
svn Diff for bugzilla2trac.py changes w.r.t. trac-0.11.1 and mysql
comment:4 by , 13 years ago
Added one more diff - http://trac.edgewall.org/attachment/ticket/10504/bugzilla2py_mysql_0_11_1.diff
This is for the change I had to make while importing into Mysql database. Only difference from previous attachment (http://trac.edgewall.org/attachment/ticket/10504/bugzilla2py_0_11_1.diff) is that I had to change table name from "Ticket" to "ticket" in the query in TracDatabase.hasTickets. "Ticket" worked for sqlite but I guess mysql has case-sensitive table names. Actual table is named "ticket". The latest code in trunk has correct table-name "ticket". Just FYI.
comment:7 by , 12 years ago
Description: | modified (diff) |
---|
comment:8 by , 12 years ago
Type: | enhancement → defect |
---|
Looks like the 'attachments'
has to be modified anyway due to r11028.
comment:9 by , 12 years ago
API Changes: | modified (diff) |
---|
comment:10 by , 10 years ago
Milestone: | next-stable-1.0.x → not applicable |
---|
comment:11 by , 5 years ago
Keywords: | bugzilla2trac added; bugzilla removed |
---|
comment:12 by , 5 years ago
Milestone: | not applicable |
---|---|
Resolution: | → wontfix |
Status: | new → closed |
bugzilla2trac.py
is no longer maintainer by Trac developers and is being deleted from the trunk. If you need the plugin, please consider copying it from 1.4-stable and creating a plugin on trac-hacks.org.
Would you mind submitting a patch? It's much easier to apply on the code than an English explanation ;)