Makes migrate_from_mantis compatible with Rails3.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9581 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
fb8ca0d2f8
commit
1e491c0bfd
|
@ -271,8 +271,8 @@ task :migrate_from_mantis => :environment do
|
||||||
next unless p.save
|
next unless p.save
|
||||||
projects_map[project.id] = p.id
|
projects_map[project.id] = p.id
|
||||||
p.enabled_module_names = ['issue_tracking', 'news', 'wiki']
|
p.enabled_module_names = ['issue_tracking', 'news', 'wiki']
|
||||||
p.trackers << TRACKER_BUG
|
p.trackers << TRACKER_BUG unless p.trackers.include?(TRACKER_BUG)
|
||||||
p.trackers << TRACKER_FEATURE
|
p.trackers << TRACKER_FEATURE unless p.trackers.include?(TRACKER_FEATURE)
|
||||||
print '.'
|
print '.'
|
||||||
|
|
||||||
# Project members
|
# Project members
|
||||||
|
@ -331,7 +331,7 @@ task :migrate_from_mantis => :environment do
|
||||||
# Redmine checks that the assignee is a project member
|
# Redmine checks that the assignee is a project member
|
||||||
if (bug.handler_id && users_map[bug.handler_id])
|
if (bug.handler_id && users_map[bug.handler_id])
|
||||||
i.assigned_to = User.find_by_id(users_map[bug.handler_id])
|
i.assigned_to = User.find_by_id(users_map[bug.handler_id])
|
||||||
i.save_with_validation(false)
|
i.save(:validate => false)
|
||||||
end
|
end
|
||||||
|
|
||||||
# Bug notes
|
# Bug notes
|
||||||
|
@ -476,7 +476,7 @@ task :migrate_from_mantis => :environment do
|
||||||
break unless STDIN.gets.match(/^y$/i)
|
break unless STDIN.gets.match(/^y$/i)
|
||||||
|
|
||||||
# Default Mantis database settings
|
# Default Mantis database settings
|
||||||
db_params = {:adapter => 'mysql',
|
db_params = {:adapter => 'mysql2',
|
||||||
:database => 'bugtracker',
|
:database => 'bugtracker',
|
||||||
:host => 'localhost',
|
:host => 'localhost',
|
||||||
:username => 'root',
|
:username => 'root',
|
||||||
|
|
Loading…
Reference in New Issue