@@ -314,7 +314,7 task :migrate_from_mantis => :environment do | |||||
314 | Issue.destroy_all |
|
314 | Issue.destroy_all | |
315 | issues_map = {} |
|
315 | issues_map = {} | |
316 | keep_bug_ids = (Issue.count == 0) |
|
316 | keep_bug_ids = (Issue.count == 0) | |
317 |
MantisBug.find(: |
|
317 | MantisBug.find_each(:batch_size => 200) do |bug| | |
318 | next unless projects_map[bug.project_id] && users_map[bug.reporter_id] |
|
318 | next unless projects_map[bug.project_id] && users_map[bug.reporter_id] | |
319 | i = Issue.new :project_id => projects_map[bug.project_id], |
|
319 | i = Issue.new :project_id => projects_map[bug.project_id], | |
320 | :subject => encode(bug.summary), |
|
320 | :subject => encode(bug.summary), |
@@ -458,7 +458,7 namespace :redmine do | |||||
458 |
|
458 | |||
459 | # Tickets |
|
459 | # Tickets | |
460 | print "Migrating tickets" |
|
460 | print "Migrating tickets" | |
461 |
TracTicket.find(: |
|
461 | TracTicket.find_each(:batch_size => 200) do |ticket| | |
462 | print '.' |
|
462 | print '.' | |
463 | STDOUT.flush |
|
463 | STDOUT.flush | |
464 | i = Issue.new :project => @target_project, |
|
464 | i = Issue.new :project => @target_project, |
General Comments 0
You need to be logged in to leave comments.
Login now