summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2012-04-29 09:49:02 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2012-04-29 09:49:02 +0000
commit1e491c0bfdcf24639c20a619c308436f47c652d1 (patch)
tree7f465814a75a837ed52b49356cb0168feef2f43e /lib
parentfb8ca0d2f80b7c746f36fb4c60bffffc43d3a49b (diff)
downloadredmine-1e491c0bfdcf24639c20a619c308436f47c652d1.tar.gz
redmine-1e491c0bfdcf24639c20a619c308436f47c652d1.zip
Makes migrate_from_mantis compatible with Rails3.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9581 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib')
-rw-r--r--lib/tasks/migrate_from_mantis.rake8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/tasks/migrate_from_mantis.rake b/lib/tasks/migrate_from_mantis.rake
index e602455af..191e56b81 100644
--- a/lib/tasks/migrate_from_mantis.rake
+++ b/lib/tasks/migrate_from_mantis.rake
@@ -271,8 +271,8 @@ task :migrate_from_mantis => :environment do
next unless p.save
projects_map[project.id] = p.id
p.enabled_module_names = ['issue_tracking', 'news', 'wiki']
- p.trackers << TRACKER_BUG
- p.trackers << TRACKER_FEATURE
+ p.trackers << TRACKER_BUG unless p.trackers.include?(TRACKER_BUG)
+ p.trackers << TRACKER_FEATURE unless p.trackers.include?(TRACKER_FEATURE)
print '.'
# Project members
@@ -331,7 +331,7 @@ task :migrate_from_mantis => :environment do
# Redmine checks that the assignee is a project member
if (bug.handler_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
# Bug notes
@@ -476,7 +476,7 @@ task :migrate_from_mantis => :environment do
break unless STDIN.gets.match(/^y$/i)
# Default Mantis database settings
- db_params = {:adapter => 'mysql',
+ db_params = {:adapter => 'mysql2',
:database => 'bugtracker',
:host => 'localhost',
:username => 'root',