Edgewall Software

Ticket #7333 (assigned defect)

Opened 7 months ago

Last modified 3 months ago

[PATCH] bugzilla2trac.py: import Bugzilla version 2.18.4

Reported by: thomas.klenner@… Owned by: jruigrok
Priority: normal Milestone: 0.11.3
Component: ticket system Version: 0.10.4
Severity: normal Keywords: bugzilla verify patch
Cc:

Description

I just managed to import my bugs from Bugzilla version 2.18.4 into Trac Version 0.10.4.

However, some changes were necessary to the original Bugzilla DB contents as well as to the import script itself:

Trac needs unique product names

I used the option in the conversion script:

COMPONENTS_FROM_PRODUCTS = False

This caused the script to fail because my Bugzilla DB contained the same component name for various products.

After renaming the duplicate components, the script managed to import them.

DB schema problem

The import of attachments failed because of a wrong check for the Bugzilla version in the script (line 824):

The correct select statement from tables attachments and attach_data depends on the Bugzilla version. The script uses the table attach_data for versions greater or equal than 2180. However, this table was introduced in version 2211 (see http://www.ravenbrook.com/project/p4dti/tool/cgi/bugzilla-schema/).

After changing the condition to

        if BZ_VERSION >= 2210:

the import succeeded.

Multiple attachments.isobsolete at the same time

My bugzilla DB contained three changes of type "attachments.isobsolete" for the same bug at the same time.

This caused a duplicate primary key error in table ticket_change.

See my comments on Ticket #6753 for details.

Attachments

Change History

  Changed 7 months ago by Piotr Kuczynski <piotr.kuczynski@…>

  • keywords bugzilla verify patch added; Bugzilla import removed
  • summary changed from bugzilla2trac.py: import Bugzilla version 2.18.4 to [PATCH] bugzilla2trac.py: import Bugzilla version 2.18.4
  • component changed from general to ticket system
  • milestone set to 0.10.6

follow-ups: ↓ 3 ↓ 5   Changed 7 months ago by jruigrok

  • status changed from new to assigned

Thomas, I fixed the version comparison. Is it safe to say that this ticket can be closed since the other points are raised in other tickets?

in reply to: ↑ 2   Changed 7 months ago by thomas.klenner@…

Replying to jruigrok:

Thomas, I fixed the version comparison. Is it safe to say that this ticket can be closed since the other points are raised in other tickets?

Yes, that's OK for me.

  Changed 6 months ago by anonymous

  • milestone changed from 0.10.6 to 0.11.1

in reply to: ↑ 2   Changed 3 months ago by cboos

  • milestone changed from 0.11.2 to 0.11.3

Replying to jruigrok:

Thomas, I fixed the version comparison. Is it safe to say that this ticket can be closed since the other points are raised in other tickets?

Well apparently not, source:branches/0.11-stable/contrib/bugzilla2trac.py@6820#L824 still has the test against 2180 and not 2211 as Thomas said it should be.

  Changed 3 months ago by cboos

(the problem with the link above has been recorded as #7744)

Add/Change #7333 ([PATCH] bugzilla2trac.py: import Bugzilla version 2.18.4)

Author



Change Properties
<Author field>
Action
as assigned
as The resolution will be set. Next status will be 'closed'
to The owner will change from jruigrok. Next status will be 'new'
 
Note: See TracTickets for help on using tickets.