##// END OF EJS Templates
Makes migrate_from_mantis compatible with Rails3....
Jean-Philippe Lang -
r9398:1e491c0bfdcf
parent child
Show More
@@ -271,8 +271,8 task :migrate_from_mantis => :environment do
271 next unless p.save
271 next unless p.save
272 projects_map[project.id] = p.id
272 projects_map[project.id] = p.id
273 p.enabled_module_names = ['issue_tracking', 'news', 'wiki']
273 p.enabled_module_names = ['issue_tracking', 'news', 'wiki']
274 p.trackers << TRACKER_BUG
274 p.trackers << TRACKER_BUG unless p.trackers.include?(TRACKER_BUG)
275 p.trackers << TRACKER_FEATURE
275 p.trackers << TRACKER_FEATURE unless p.trackers.include?(TRACKER_FEATURE)
276 print '.'
276 print '.'
277
277
278 # Project members
278 # Project members
@@ -331,7 +331,7 task :migrate_from_mantis => :environment do
331 # Redmine checks that the assignee is a project member
331 # Redmine checks that the assignee is a project member
332 if (bug.handler_id && users_map[bug.handler_id])
332 if (bug.handler_id && users_map[bug.handler_id])
333 i.assigned_to = User.find_by_id(users_map[bug.handler_id])
333 i.assigned_to = User.find_by_id(users_map[bug.handler_id])
334 i.save_with_validation(false)
334 i.save(:validate => false)
335 end
335 end
336
336
337 # Bug notes
337 # Bug notes
@@ -476,7 +476,7 task :migrate_from_mantis => :environment do
476 break unless STDIN.gets.match(/^y$/i)
476 break unless STDIN.gets.match(/^y$/i)
477
477
478 # Default Mantis database settings
478 # Default Mantis database settings
479 db_params = {:adapter => 'mysql',
479 db_params = {:adapter => 'mysql2',
480 :database => 'bugtracker',
480 :database => 'bugtracker',
481 :host => 'localhost',
481 :host => 'localhost',
482 :username => 'root',
482 :username => 'root',
General Comments 0
You need to be logged in to leave comments. Login now