
rdmcguire01 at gmail
Jul 1, 2009, 8:25 AM
Views: 141
Permalink
|
|
bugzilla2trac.py unique column constraits causing issues
|
|
I've noticed multiple tickets that were opened by people experiencing a similar issue but have yet to determine any specifics about this issue. >From what I understand, this is caused by ticket updates in bugzilla that have the same bug_id and timestamp. When I ran a query to count these against my bugzilla database (which has upwards of 2k) I found over 767 rows. select distinct count(*),bug_id,bug_when from bugs_activity group by bug_when order by count(*) asc; ... | 5 | 43 | 2006-06-28 11:40:39 | +----------+--------+---------------------+ 767 rows in set (0.00 sec) The funny thing here is that ticket 43 got inserted fine, but it failed at ticket 205. I deleted 205 hoping it was just hung up on this ticket and it stopped at 204... Any ideas here? Is there a way I can modify the script to just continue and skip the ticket if it encounters this error? Here is the traceback: inserting ticket 204 -- status summary for all servers needed Traceback (most recent call last): File "bugzilla2trac.py", line 913, in ? main() File "bugzilla2trac.py", line 910, in main convert(BZ_DB, BZ_HOST, BZ_USER, BZ_PASSWORD, TRAC_ENV, TRAC_CLEAN) File "bugzilla2trac.py", line 795, in convert trac.addTicketChange (**ticketChange) File "bugzilla2trac.py", line 391, in addTicketChange (ticket, datetime2epoch(time), author, field, File "/usr/lib/python2.4/site-packages/Trac-0.11.4-py2.4.egg/trac/db/util.py", line 50, in execute return self.cursor.execute(sql_escape_percent(sql), args) File "/usr/lib64/python2.4/site-packages/sqlite/main.py", line 255, in execute self.rs = self.con.db.execute(SQL % parms) _sqlite.IntegrityError: columns ticket, time, field are not unique Thanks, -Ryan --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Trac Users" group. To post to this group, send email to trac-users[at]googlegroups.com To unsubscribe from this group, send email to trac-users+unsubscribe[at]googlegroups.com For more options, visit this group at http://groups.google.com/group/trac-users?hl=en -~----------~----~----~----~------~----~------~--~---
|