Patch #33722

migrate_from_trac dose not work

Added by Hideyuki KATO 11 months ago. Updated 11 months ago.

Status:ResolvedStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Importers
Target version:-

Description

Current migrate_from_trac rake task dose not work with 3.4.13, 4.0.7, 4.1.1.

There are many patches, but they have not been applied. and they are old (maybe they are for Redmine2.x or early 3.x)

I have merged these patches and available on Redmine 3.4.13. but not work with Redmine 4.x. because of the difference between Rails/ActiveRecord 4.2 and 5.2.

https://github.com/hkato/migrate_from_trac.rake/blob/master/migrate_from_trac-trac-1.0.patch

Anyway, could you merge this patch for trunk. and we will support Rails/ActiveRecord 5.2 issue after this.

Redmine 3.4.13

$ rake redmine:migrate_from_trac RAILS_ENV="production" 
rake aborted!
NoMethodError: undefined method `set_inheritance_column' for TracMigrate::TracAttachment(Table doesn't exist):Class
Did you mean?  set_trace_func
/usr/local/bundle/gems/activerecord-4.2.11.1/lib/active_record/dynamic_matchers.rb:26:in `method_missing'
/usr/src/redmine/lib/tasks/migrate_from_trac.rake:121:in `<class:TracAttachment>'
/usr/src/redmine/lib/tasks/migrate_from_trac.rake:119:in `<module:TracMigrate>'
/usr/src/redmine/lib/tasks/migrate_from_trac.rake:25:in `block (2 levels) in <top (required)>'
/usr/local/bundle/gems/rake-13.0.1/exe/rake:27:in `<top (required)>'
Tasks: TOP => redmine:migrate_from_trac
(See full trace by running task with --trace)

Redmine 4.1.1

$ rake redmine:migrate_from_trac RAILS_ENV="production" 
rake aborted!
NoMethodError: undefined method `set_inheritance_column' for TracMigrate::TracAttachment(Table doesn't exist):Class
Did you mean?  set_trace_func
/usr/local/bundle/gems/activerecord-5.2.4.2/lib/active_record/dynamic_matchers.rb:22:in `method_missing'
/usr/src/redmine/lib/tasks/migrate_from_trac.rake:121:in `<class:TracAttachment>'
/usr/src/redmine/lib/tasks/migrate_from_trac.rake:119:in `<module:TracMigrate>'
/usr/src/redmine/lib/tasks/migrate_from_trac.rake:25:in `block (2 levels) in <top (required)>'
/usr/local/bundle/gems/rake-13.0.1/exe/rake:27:in `<top (required)>'
Tasks: TOP => redmine:migrate_from_trac
(See full trace by running task with --trace)

migrate_from_trac-trac-1.0.patch Magnifier (7.55 KB) Hideyuki KATO, 2020-07-13 02:49

History

#1 Updated by Hideyuki KATO 11 months ago

There are many patches, but they have not been applied. and they are old (maybe they are for Redmine2.x or early 3.x)

Everybody already migrate from Trac/Mantis to Redmine or other system. And not interested in this kind of issue...?

If so, I think it is better that Redmine project stop supporting migration tasks.
I am confused.

Mantis has same issue.

# rake redmine:migrate_from_mantis RAILS_ENV="production" 
rake aborted!
NoMethodError: undefined method `set_inheritance_column' for MantisMigrate::MantisCustomField(Table doesn't exist):Class
Did you mean?  set_trace_func
/usr/local/bundle/gems/activerecord-5.2.4.2/lib/active_record/dynamic_matchers.rb:22:in `method_missing'
/usr/src/redmine/lib/tasks/migrate_from_mantis.rake:215:in `<class:MantisCustomField>'
/usr/src/redmine/lib/tasks/migrate_from_mantis.rake:213:in `<module:MantisMigrate>'
/usr/src/redmine/lib/tasks/migrate_from_mantis.rake:26:in `block (2 levels) in <top (required)>'
/usr/local/bundle/gems/rake-13.0.1/exe/rake:27:in `<top (required)>'
Tasks: TOP => redmine:migrate_from_mantis
(See full trace by running task with --trace)

#2 Updated by Hideyuki KATO 11 months ago

  • Status changed from New to Resolved

I already migrated from Trac to Gitlab via Redmine by using this patch.

Farewell, Redmine!

Sayonara, Sayonara, Bye-bye, adios.

   ∧ ∧     ┌─────────────
  ( ´ー`)   < シラネーヨ
   \ <     └───/|────────
    \.\______//
      \       /
       ∪∪ ̄∪∪

Also available in: Atom PDF