Edgewall Software
Modify

Opened 16 years ago

Closed 4 years ago

#6753 closed defect (wontfix)

bugzilla2trac.py: attachment.isobsolete has to be ignored

Reported by: mbertheau@… Owned by:
Priority: normal Milestone:
Component: contrib Version: devel
Severity: normal Keywords: bugzilla2trac
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

This property is per-attachment in bugzilla, but the script imports it per-ticket. A change of the isobsolete field of two attachments at the same time in bugzilla will lead to a unique constraint violation on the trac side, causing the import to fail.

Adding the field to IGNORED_ACTIVITY_FIELDS solves the problem and allows the import to continue.

Attachments (0)

Change History (10)

comment:1 by anonymous, 16 years ago

-IGNORED_ACTIVITY_FIELDS = ["everconfirmed"]
+IGNORED_ACTIVITY_FIELDS = ["everconfirmed", "attachments.isobsolete"]

comment:2 by anonymous, 16 years ago

Other than that, the script runs correctly on bugzilla 2.32.2. I also had to set sys.setdefaultencoding('utf8').

comment:3 by Emmanuel Blot, 16 years ago

Milestone: 0.110.11.1

should not block 0.11

comment:4 by anonymous, 16 years ago

Actually the attachments were not imported correctly, see #6792.

comment:5 by Jeroen Ruigrok van der Werven, 16 years ago

Owner: changed from Jonas Borgström to Jeroen Ruigrok van der Werven
Status: newassigned

comment:6 by thomas.klenner@…, 16 years ago

I had a similar problem when importing from Bugzilla 2.18.4 but solved it differently:

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

mysql> SELECT * FROM bugs_activity WHERE bug_id = 1567 order by bug_when;
+--------+-----------+-----+---------------------+---------+----------+----------+
| bug_id | attach_id | who | bug_when            | fieldid | added    | removed  |
+--------+-----------+-----+---------------------+---------+----------+----------+
|   1567 |       182 |  15 | 2007-05-15 16:48:28 |      27 | 1        | 0        | 
|   1567 |       183 |  15 | 2007-05-15 16:48:28 |      27 | 1        | 0        | 
|   1567 |       184 |  15 | 2007-05-15 16:48:28 |      27 | 1        | 0        | 
+--------+-----------+-----+---------------------+---------+----------+----------+

In the bugzilla2trac.py script, I noticed some code for the case that

# cc  sometime appear in different activities with same time

I changed the script and added the same handling for field_name = "attachments.isobsolete":

   # cc and attachments.isobsolete sometime appear 
   # in different activities with same time
   if ( (field_name == "cc" or field_name == "attachments.isobsolete") \
      ...

After this change, the script successfully imported my bugzilla tickets and attachments.

comment:7 by Jeroen Ruigrok van der Werven, 14 years ago

Owner: Jeroen Ruigrok van der Werven removed
Status: assignednew

comment:8 by Christian Boos, 14 years ago

Keywords: bugzilla2trac added
Milestone: next-minor-0.12.xnot applicable

comment:9 by Christian Boos, 14 years ago

Component: generalcontrib

comment:10 by Ryan J Ollos, 4 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.