Opened 17 years ago
Closed 5 years ago
#6753 closed defect (wontfix)
bugzilla2trac.py: attachment.isobsolete has to be ignored
Reported by: | 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:2 by , 17 years ago
Other than that, the script runs correctly on bugzilla 2.32.2. I also had to set sys.setdefaultencoding('utf8').
comment:5 by , 17 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:6 by , 17 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 , 15 years ago
Owner: | removed |
---|---|
Status: | assigned → new |
comment:8 by , 15 years ago
Keywords: | bugzilla2trac added |
---|---|
Milestone: | next-minor-0.12.x → not applicable |
comment:9 by , 15 years ago
Component: | general → contrib |
---|
comment:10 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.