Edgewall Software
Modify

Opened 13 years ago

Closed 5 years ago

#10504 closed defect (wontfix)

[PATCH] bugzilla2trac.py: import Bugzilla version 4.0.1

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:
Internal Changes:

Description (last modified by Ryan J Ollos <ryano@…>)

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.
    
  2. 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)

bugzilla2py_0_11_1.diff (1.8 KB ) - added by tapomay.dey@… 13 years ago.
svn Diff for bugzilla2trac.py changes w.r.t. trac-0.11.1
bugzilla2py_mysql_0_11_1.diff (2.1 KB ) - added by tapomay.dey@… 13 years ago.
svn Diff for bugzilla2trac.py changes w.r.t. trac-0.11.1 and mysql

Download all attachments as: .zip

Change History (14)

comment:1 by Remy Blank, 13 years ago

Milestone: not applicable

Would you mind submitting a patch? It's much easier to apply on the code than an English explanation ;)

by tapomay.dey@…, 13 years ago

Attachment: bugzilla2py_0_11_1.diff added

svn Diff for bugzilla2trac.py changes w.r.t. trac-0.11.1

comment:3 by Remy Blank, 13 years ago

Milestone: 0.13
Owner: set to Remy Blank

Yes, that's what I meant. Thank you.

by tapomay.dey@…, 13 years ago

svn Diff for bugzilla2trac.py changes w.r.t. trac-0.11.1 and mysql

comment:4 by tapomay.dey@…, 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:5 by Remy Blank, 13 years ago

Owner: Remy Blank removed

Refocusing.

comment:6 by Remy Blank, 13 years ago

Milestone: 1.01.0-triage

Preparing for 1.0.

comment:7 by Ryan J Ollos <ryano@…>, 12 years ago

Description: modified (diff)

comment:8 by Christian Boos, 12 years ago

Type: enhancementdefect

Looks like the 'attachments' has to be modified anyway due to r11028.

comment:9 by Christian Boos, 12 years ago

API Changes: modified (diff)

comment:10 by Ryan J Ollos, 10 years ago

Milestone: next-stable-1.0.xnot applicable

comment:11 by Ryan J Ollos, 5 years ago

Keywords: bugzilla2trac added; bugzilla removed

comment:12 by Ryan J Ollos, 5 years ago

Milestone: not applicable
Resolution: wontfix
Status: newclosed

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.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The ticket will remain with no owner.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from (none) 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.