Edgewall Software

Ticket #7141 (new defect)

Opened 8 months ago

Last modified 7 months ago

bugzilla2trac.py default behavior of TRAC_CLEAN

Reported by: dekimsey@… Owned by: cboos
Priority: normal Milestone: 0.11-retriage
Component: ticket system Version:
Severity: normal Keywords: bugzilla2trac.py
Cc:

Description

Default behavior of TRAC_CLEAN should really really not be True, this is cruel. Thank god for sys admins who actually back stuff up.....

Oh and kudos on the really effective cleaning mechanism, it was very thorough.

Attachments

bugzilla2trac.py.patch (4.8 KB) - added by dekimsey@… 8 months ago.
patch referred to in comment:ticket:7141:2
bugzilla2trac.py.2.patch (5.4 KB) - added by dekimsey@… 7 months ago.
working patch of the implementation

Change History

Changed 8 months ago by dekimsey@…

  • owner changed from jonas to cboos
  • component changed from general to ticket system

In my setup, I had to import bugzilla tickets into an existing Trac database. The following patch is the changes that I had to make in order to get this to function correctly. Please note the attachment also contains the changes from the patch posted ticket #5585, specifically attachment:ticket:5585:bugzilla_3.0_compatibility.patch.

  • Changed the default of TRAC_CLEAN to false.
  • Changed the return value of hasTickets to be an integer value ( the current index )
  • Changed assertNoTickets to not really assert anything.
  • Modified inserting ticket print out to indicate the bugid => ticketid conversion
  • Changed addAttachment to accept the ticket id from the arguments
  • Support for bugzilla 3.0, from patch in attachment:ticket:5585:bugzilla_3.0_compatibility.patch
  • Added a printout to state what the starting index for all the bugs to be imported.
  • Modified various references to bugid to use the ticket['id'] instead.

Changed 8 months ago by dekimsey@…

patch referred to in comment:ticket:7141:2

Changed 8 months ago by cboos

  • milestone set to 0.11.1

About bugzilla2trac.py.patch: it looks empty but isn't, because the internal Trac patch viewer fails, then Pygments tries to render it but produces no output instead of failing - that's why Trac doesn't revert to plain text.

WARNING: HTML preview using <trac.mimeview.patch.PatchRenderer object at 0x02F8D390> failed (Invalid unified diff content)
DEBUG: Trying to render HTML preview using PygmentsRenderer [lineno]

It seems there's a problem with the patch itself:

patching file bugzilla2trac.py
patch: **** malformed patch at line 12: @@ -234,12 +234,13 @@

Please have a look at TracDev/SubmittingPatches. Best is to use svn diff to produce the patches.

Changed 7 months ago by dekimsey@…

I had edited the patch post-creation, probably screwed the syntax a bit in the process. Nonetheless, here is the patch again, this time without any edits on my part :).

Changed 7 months ago by dekimsey@…

working patch of the implementation

Add/Change #7141 (bugzilla2trac.py default behavior of TRAC_CLEAN)

Author



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