ChiliProject is not maintained anymore. Please be advised that there will be no more updates.

We do not recommend that you setup new ChiliProject instances and we urge all existing users to migrate their data to a maintained system, e.g. Redmine. We will provide a migration script later. In the meantime, you can use the instructions by Christian Daehn.

migrate from mantis script fails on first project missing MantisProjectUser (Bug #943)


Added by Alan Chandler at 2012-03-21 09:19 pm. Updated at 2012-04-12 09:28 am.


Status:Open Start date:2012-03-21
Priority:Normal Due date:
Assignee:- % Done:

0%

Category:-
Target version:-
Remote issue URL: Affected version:

Description

This follows on from #942, with the same environment - note the line numbers below include applying the patch in that bug report

Migrating users......
rake aborted!
MantisMigrate is not missing constant MantisProjectUser!
/var/lib/gems/1.8/gems/activesupport-2.3.14/lib/active_support/dependencies.rb:443:in `load_missing_constant'
/var/lib/gems/1.8/gems/activesupport-2.3.14/lib/active_support/dependencies.rb:106:in `const_missing'
/var/lib/gems/1.8/gems/activesupport-2.3.14/lib/active_support/dependencies.rb:124:in `send'
/var/lib/gems/1.8/gems/activesupport-2.3.14/lib/active_support/dependencies.rb:124:in `const_missing'
/var/lib/gems/1.8/gems/activerecord-2.3.14/lib/active_record/base.rb:1:in `compute_type'
/var/lib/gems/1.8/gems/activesupport-2.3.14/lib/active_support/core_ext/kernel/reporting.rb:11:in `silence_warnings'
/var/lib/gems/1.8/gems/activerecord-2.3.14/lib/active_record/base.rb:2234:in `compute_type'
/var/lib/gems/1.8/gems/activerecord-2.3.14/lib/active_record/reflection.rb:156:in `send'
/var/lib/gems/1.8/gems/activerecord-2.3.14/lib/active_record/reflection.rb:156:in `klass'
/var/lib/gems/1.8/gems/activerecord-2.3.14/lib/active_record/reflection.rb:187:in `quoted_table_name'
/var/lib/gems/1.8/gems/activerecord-2.3.14/lib/active_record/associations/has_many_association.rb:97:in `construct_sql'
/var/lib/gems/1.8/gems/activerecord-2.3.14/lib/active_record/associations/association_collection.rb:21:in `initialize'
/var/lib/gems/1.8/gems/activerecord-2.3.14/lib/active_record/associations.rb:1306:in `new'
/var/lib/gems/1.8/gems/activerecord-2.3.14/lib/active_record/associations.rb:1306:in `members'
/home/alan/dev/chiliproject/lib/tasks/migrate_from_mantis.rake:276:in `migrate'
/home/alan/dev/chiliproject/lib/tasks/migrate_from_mantis.rake:265:in `each'
/home/alan/dev/chiliproject/lib/tasks/migrate_from_mantis.rake:265:in `migrate'
/home/alan/dev/chiliproject/lib/tasks/migrate_from_mantis.rake:507
/var/lib/gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `call'
/var/lib/gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `execute'
/var/lib/gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `each'
/var/lib/gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `execute'
/var/lib/gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:158:in `invoke_with_call_chain'
/usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/var/lib/gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/var/lib/gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:176:in `invoke_prerequisites'
/var/lib/gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:174:in `each'
/var/lib/gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:174:in `invoke_prerequisites'
/var/lib/gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:157:in `invoke_with_call_chain'
/usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/var/lib/gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/var/lib/gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:144:in `invoke'
/var/lib/gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:116:in `invoke_task'
/var/lib/gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `top_level'
/var/lib/gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `each'
/var/lib/gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `top_level'
/var/lib/gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/var/lib/gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:88:in `top_level'
/var/lib/gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:66:in `run'
/var/lib/gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/var/lib/gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:63:in `run'
/var/lib/gems/1.8/gems/rake-0.9.2.2/bin/rake:33
/usr/local/bin/rake:19:in `load'
/usr/local/bin/rake:19
Tasks: TOP => migrate_from_mantis => redmine:migrate_from_mantis
Migrating projects.al


migrate_from_mantis.rake - Reworked mantis migration script (21.1 kB) Sven Fischer, 2012-04-04 07:54 am


Associated revisions

Revision 85858ceb
Added by Jean-Philippe Lang at 2008-03-29 10:24 am

Fixed: https urls in the wiki are not displayed as external (closes #943).

git-svn-id: http://redmine.rubyforge.org/svn/trunk@1301 e93f8b46-1217-0410-a6f0-8f06a7374b81

History

Updated by Sven Fischer at 2012-04-04 07:54 am

I have added a preliminary version of my reworked mantis migration script. I based my work on http://www.webismymind.be/page/fr/17/migrate-mantis-120rc1-to-redmine.html applied the patch from #942, and added the monkey patch from https://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/2283 Additionally I added some work to migrate the bug history, but this may not be complete (missing a large database for testing).

Updated by Alan Chandler at 2012-04-04 08:02 am

If you haven't already, I suggest you also look at http://www.redmine.org/issues/10532. I found many more problems along the way to getting a working script (with Redmine) and left the patch there which solved all that I found.

I did manage to migrate my database (it had about 400 issues). Unfortunately I can let you have a copy to test since much of it is commercially sensitive stuff for my clients.

Updated by Alan Chandler at 2012-04-04 08:05 am

Sorry that should have said CAN'T let you have a copy of my database. (tried editing the original but it wouldn't let me)

Updated by Sven Fischer at 2012-04-12 09:16 am

Alan Chandler wrote:

If you haven't already, I suggest you also look at http://www.redmine.org/issues/10532. I found many more problems along the way to getting a working script (with Redmine) and left the patch there which solved all that I found.

I did manage to migrate my database (it had about 400 issues). Unfortunately I can let you have a copy to test since much of it is commercially sensitive stuff for my clients.

Did you use my script or your patched one? If you find the time, merging your and my approach would make sense to let it be incorporated into the source repository...

Updated by Alan Chandler at 2012-04-12 09:28 am

Sven Fischer wrote:

Alan Chandler wrote:

If you haven't already, I suggest you also look at http://www.redmine.org/issues/10532. I found many more problems along the way to getting a working script (with Redmine) and left the patch there which solved all that I found.

I did manage to migrate my database (it had about 400 issues). Unfortunately I can let you have a copy to test since much of it is commercially sensitive stuff for my clients.

Did you use my script or your patched one? If you find the time, merging your and my approach would make sense to let it be incorporated into the source repository...

I only used my patched script, and only on Redmine itself.

I don't really understand Ruby - so I wouldn't feel competent to merge things. I did what I could to get it working. I invite you to take it and try to merge.

Some of the bugs I found might be related to using sqlite as the destination database. Time values are stored as INTs (seconds from 1970) in Mantis, and were being left as left as Ints in the conversion. The other major change was turning off the automatic update time, since all my issues were showing last updated at the time of migration (despite the script trying to set the time from the Mantis database).

Also available in: Atom PDF