Patch #1540

Migrate from Trac v0.8.x

Added by Hallison Vasconcelos Batista over 9 years ago. Updated over 9 years ago.

Status:ClosedStart date:2008-06-27
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Importers
Target version:0.8

Description

In task for migrate projects from Trac v0.8.x to redmine, I get following error:

Migrating components........
Migrating milestones.rake aborted!
undefined method `description' for #<TracMigrate::TracMilestone:0xb7026590>

For resolved this problem, I create a patch that fix this error.

      class TracMilestone < ActiveRecord::Base
        set_table_name :milestone

        def due
          if read_attribute(:due) && read_attribute(:due) > 0
            Time.at(read_attribute(:due)).to_date
          else
            nil
          end
        end

        def description
          return read_attribute(:descr) if has_attribute?(:descr) # Only Trac v0.8.x
          read_attribute(:description)
        end
      end

It's work.

migrate_from_trac.rake.patch Magnifier - Patch for fix migration projects from Trac v0.8.x (513 Bytes) Hallison Vasconcelos Batista, 2008-06-27 19:12

Associated revisions

Revision 1597
Added by Jean-Philippe Lang over 9 years ago

Makes importer work with Trac 0.8.x (#1540).

History

#1 Updated by Jean-Philippe Lang over 9 years ago

  • Category changed from Projects to Importers
  • Status changed from New to Closed

Fixed in r1597. Thanks.

Also available in: Atom PDF