Project

General

Profile

Migrate from Mantis - rake aborted

Added by Artiom Shurupov almost 7 years ago

Clean install Redmine

Environment:
  Redmine version                3.3.1.stable
  Ruby version                   2.3.3-p222 (2016-11-21) [x86_64-linux-gnu]
  Rails version                  4.2.7.1
  Environment                    production
  Database adapter               Mysql2
SCM:
  Git                            2.11.0
  Filesystem                     
Redmine plugins:
  no plugin installed

MantisBT version 1.2.18
when I run the script, I get an error (see attachment)
mantis.png (14.1 KB) mantis.png WTF

Replies (7)

RE: Migrate from Mantis - rake aborted - Added by Mischa The Evil almost 7 years ago

This (among others) seems to be a known issue with the migration scripts (both Trac ánd Mantis). See eg. #19173, #23268, #24570 and #20943.

RE: Migrate from Mantis - rake aborted - Added by Artiom Shurupov almost 7 years ago

I saw ... Ie. The problem can not be solved?

RE: Migrate from Mantis - rake aborted - Added by Artiom Shurupov almost 7 years ago

copy new file (source:trunk/lib/tasks/migrate_from_mantis.rake@12218) and get new error (see attachment)
what to do?

mantis2.png (40.8 KB) mantis2.png WTF2

RE: Migrate from Mantis - rake aborted - Added by Mischa The Evil almost 7 years ago

Why are you trying to overwrite/use source:/trunk/lib/tasks/migrate_from_mantis.rake@12218 over the version of 3.3.1-stable (source:/tags/3.3.1/lib/tasks/migrate_from_mantis.rake, which is at r15904)?
Your 2nd error seems to be caused by missing r13535. Make sure your Redmine source code is equal to the actual 3.3.1 tag's. Better yet, make sure to install one of the latest releases (3.4.3 or 3.3.5).

RE: Migrate from Mantis - rake aborted - Added by Artiom Shurupov almost 7 years ago

I doing:
instead of
set_inheritance_column :none
=>
self.inheritance_column = :none
and rake work :) Tnx

RE: Migrate from Mantis - rake aborted - Added by Artiom Shurupov almost 7 years ago

Do not migrate :(
Migrate only users. After migration I get an error (see attachment)
I'm desperate...

RE: Migrate from Mantis - rake aborted - Added by Artiom Shurupov almost 7 years ago

I'm did it!
...had to sacrifice categories
In addition to the fact that you need to replace the line:
set_inheritance_column :none on self.inheritance_column = :none

Table "mantis_project_category_table" does not exist. It may be a question of a table "mantis_category_table", but the experiments showed that the categories are not carried over and there is an error.

...
class MantisCategory < ActiveRecord::Base
self.table_name = :mantis_project_category_table
end
...

ok... I commented out the lines:

#Project categories
#project.categories.each do |category|
#g = IssueCategory.new :name => category.category[0,30]
#g.project = p
#g.save
#categories_map[category.category] = g.id
#end
...
#i.category = IssueCategory.find_by_project_id_and_name(i.project_id, bug.category[0,30]) unless bug.category.blank?
...
#puts "Categories: #{IssueCategory.count}/#{MantisCategory.count}"

and migration completed successfully!
But... not all projects were transferred.
See what is wrong... it turned out that if an empty project contains not empty subprojects, then neither the empty project nor its (full) subprojects are transferred.
I think this is a small bug
but most of all I was disappointed that the dates of bugs were not transferred, but the dates of migration were shown. All attachments in bugs on behalf of "Redmine Admin" and the date of attachment, too, was not transferred
I think this is a small bug too

mantis4!!!.png (15.2 KB) mantis4!!!.png I'm did it!
    (1-7/7)