Project

General

Profile

Actions

Defect #7476

closed

Migration from Mantis (1.0.6) to Redmine (1.0.3) failed

Added by Matthieu Brucher almost 14 years ago. Updated almost 14 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Importers
Target version:
-
Start date:
2011-01-28
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed
Affected version:

Description

Hi,

I have trouble migrating a Mantis database to Redmine. I only uise 1.0.3 because the migration process started some months ago, and due to administrative reasons, I can't keep up with the latest version each time.
I have the infamous latin1/UTF-8 issue with mantis, so the mantis database was converted into a latin1 one (http://blog.meissner.it/migrating-from-mantis-to-redmine/). When restarting the migration, I got an error:

Migrating users..........................................................................................................................................................................................................................................
rake aborted!
undefined method `to_date' for nil:NilClass
/appli_PP/Redmine/1.0.3/SISMAGE/redmine/lib/tasks/migrate_from_mantis.rake:296:in `migrate'
/appli_PP/Redmine/1.0.3/SISMAGE/redmine/vendor/rails/activerecord/lib/active_record/associations/association_collection.rb:369:in `method_missing'
/appli_PP/Redmine/1.0.3/SISMAGE/redmine/vendor/rails/activerecord/lib/active_record/associations/association_proxy.rb:215:in `method_missing'
/appli_PP/Redmine/1.0.3/SISMAGE/redmine/vendor/rails/activerecord/lib/active_record/associations/association_proxy.rb:215:in `each'
/appli_PP/Redmine/1.0.3/SISMAGE/redmine/vendor/rails/activerecord/lib/active_record/associations/association_proxy.rb:215:in `send'
/appli_PP/Redmine/1.0.3/SISMAGE/redmine/vendor/rails/activerecord/lib/active_record/associations/association_proxy.rb:215:in `method_missing'
/appli_PP/Redmine/1.0.3/SISMAGE/redmine/vendor/rails/activerecord/lib/active_record/associations/association_collection.rb:369:in `method_missing'
/appli_PP/Redmine/1.0.3/SISMAGE/redmine/lib/tasks/migrate_from_mantis.rake:293:in `migrate'
/appli_PP/Redmine/1.0.3/SISMAGE/redmine/lib/tasks/migrate_from_mantis.rake:273:in `each'
/appli_PP/Redmine/1.0.3/SISMAGE/redmine/lib/tasks/migrate_from_mantis.rake:273:in `migrate'
/appli_PP/Redmine/1.0.3/SISMAGE/redmine/lib/tasks/migrate_from_mantis.rake:512
/appli_PP/Redmine/1.0.3/SISMAGE/apache/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:617:in `call'
/appli_PP/Redmine/1.0.3/SISMAGE/apache/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:617:in `execute'
/appli_PP/Redmine/1.0.3/SISMAGE/apache/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:612:in `each'
/appli_PP/Redmine/1.0.3/SISMAGE/apache/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:612:in `execute'
/appli_PP/Redmine/1.0.3/SISMAGE/apache/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:578:in `invoke_with_call_chain'
/appli_PP/Redmine/1.0.3/SISMAGE/apache/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/appli_PP/Redmine/1.0.3/SISMAGE/apache/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:571:in `invoke_with_call_chain'
/appli_PP/Redmine/1.0.3/SISMAGE/apache/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:564:in `invoke'
/appli_PP/Redmine/1.0.3/SISMAGE/apache/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:2019:in `invoke_task'
/appli_PP/Redmine/1.0.3/SISMAGE/apache/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1997:in `top_level'
/appli_PP/Redmine/1.0.3/SISMAGE/apache/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1997:in `each'
/appli_PP/Redmine/1.0.3/SISMAGE/apache/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1997:in `top_level'
/appli_PP/Redmine/1.0.3/SISMAGE/apache/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:2036:in `standard_exception_handling'
/appli_PP/Redmine/1.0.3/SISMAGE/apache/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1991:in `top_level'
/appli_PP/Redmine/1.0.3/SISMAGE/apache/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1970:in `run'
/appli_PP/Redmine/1.0.3/SISMAGE/apache/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:2036:in `standard_exception_handling'
/appli_PP/Redmine/1.0.3/SISMAGE/apache/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1967:in `run'
/appli_PP/Redmine/1.0.3/SISMAGE/apache/lib/ruby/gems/1.8/gems/rake-0.8.3/bin/rake:31
/appli_PP/Redmine/1.0.3/SISMAGE/apache/bin/rake:19:in `load'
/appli_PP/Redmine/1.0.3/SISMAGE/apache/bin/rake:19
Migrating projects.

It started migrating the first project, but the second one failed.

rake script/about gave this:

About your application's environment
Ruby version              1.8.7 (x86_64-linux)
RubyGems version          1.3.5
Rack version              1.0
Rails version             2.3.5
Active Record version     2.3.5
Active Resource version   2.3.5
Action Mailer version     2.3.5
Active Support version    2.3.5
Edge Rails revision       unknown
Application root          /somewhere/with/everything/redmine
Environment               production
Database adapter          mysql
Database schema version   20100819172912

Is there something I should upgrade? (perhaps upgrading to 1.1 ?)

Actions #1

Updated by Jean-Philippe Lang almost 14 years ago

This patch should solve this problem:

Index: lib/tasks/migrate_from_mantis.rake
===================================================================
--- lib/tasks/migrate_from_mantis.rake    (revision 4754)
+++ lib/tasks/migrate_from_mantis.rake    (working copy)
@@ -287,7 +287,7 @@
         project.versions.each do |version|
           v = Version.new :name => encode(version.version),
                           :description => encode(version.description),
-                          :effective_date => version.date_order.to_date
+                          :effective_date => (version.date_order ? version.date_order.to_date : nil)
           v.project = p
           v.save
           versions_map[version.id] = v.id

It's based on current but should apply on 1.0.3 mantis migration script.

Actions #2

Updated by Jean-Philippe Lang almost 14 years ago

  • Status changed from New to Closed
  • Resolution set to Fixed

Merged in 1.1-stable.

Actions

Also available in: Atom PDF