@@ -331,6 +331,7 task :migrate_from_mantis => :environment do | |||
|
331 | 331 | next unless i.save |
|
332 | 332 | issues_map[bug.id] = i.id |
|
333 | 333 | print '.' |
|
334 | STDOUT.flush | |
|
334 | 335 | |
|
335 | 336 | # Assignee |
|
336 | 337 | # Redmine checks that the assignee is a project member |
@@ -378,6 +379,7 task :migrate_from_mantis => :environment do | |||
|
378 | 379 | r.issue_to = Issue.find_by_id(issues_map[relation.destination_bug_id]) |
|
379 | 380 | pp r unless r.save |
|
380 | 381 | print '.' |
|
382 | STDOUT.flush | |
|
381 | 383 | end |
|
382 | 384 | puts |
|
383 | 385 | |
@@ -393,6 +395,7 task :migrate_from_mantis => :environment do | |||
|
393 | 395 | n.author = User.find_by_id(users_map[news.poster_id]) |
|
394 | 396 | n.save |
|
395 | 397 | print '.' |
|
398 | STDOUT.flush | |
|
396 | 399 | end |
|
397 | 400 | puts |
|
398 | 401 | |
@@ -409,7 +412,7 task :migrate_from_mantis => :environment do | |||
|
409 | 412 | :is_required => field.require_report? |
|
410 | 413 | next unless f.save |
|
411 | 414 | print '.' |
|
412 | ||
|
415 | STDOUT.flush | |
|
413 | 416 | # Trackers association |
|
414 | 417 | f.trackers = Tracker.find :all |
|
415 | 418 | |
@@ -475,6 +478,7 task :migrate_from_mantis => :environment do | |||
|
475 | 478 | |
|
476 | 479 | puts "WARNING: Your Redmine data will be deleted during this process." |
|
477 | 480 | print "Are you sure you want to continue ? [y/N] " |
|
481 | STDOUT.flush | |
|
478 | 482 | break unless STDIN.gets.match(/^y$/i) |
|
479 | 483 | |
|
480 | 484 | # Default Mantis database settings |
@@ -494,6 +498,7 task :migrate_from_mantis => :environment do | |||
|
494 | 498 | |
|
495 | 499 | while true |
|
496 | 500 | print "encoding [UTF-8]: " |
|
501 | STDOUT.flush | |
|
497 | 502 | encoding = STDIN.gets.chomp! |
|
498 | 503 | encoding = 'UTF-8' if encoding.blank? |
|
499 | 504 | break if MantisMigrate.encoding encoding |
@@ -676,6 +676,7 namespace :redmine do | |||
|
676 | 676 | puts |
|
677 | 677 | puts "This project already exists in your Redmine database." |
|
678 | 678 | print "Are you sure you want to append data to this project ? [Y/n] " |
|
679 | STDOUT.flush | |
|
679 | 680 | exit if STDIN.gets.match(/^n$/i) |
|
680 | 681 | end |
|
681 | 682 | project.trackers << TRACKER_BUG unless project.trackers.include?(TRACKER_BUG) |
@@ -726,6 +727,7 namespace :redmine do | |||
|
726 | 727 | |
|
727 | 728 | puts "WARNING: a new project will be added to Redmine during this process." |
|
728 | 729 | print "Are you sure you want to continue ? [y/N] " |
|
730 | STDOUT.flush | |
|
729 | 731 | break unless STDIN.gets.match(/^y$/i) |
|
730 | 732 | puts |
|
731 | 733 | |
@@ -733,6 +735,7 namespace :redmine do | |||
|
733 | 735 | default = options[:default] || '' |
|
734 | 736 | while true |
|
735 | 737 | print "#{text} [#{default}]: " |
|
738 | STDOUT.flush | |
|
736 | 739 | value = STDIN.gets.chomp! |
|
737 | 740 | value = default if value.blank? |
|
738 | 741 | break if yield value |
General Comments 0
You need to be logged in to leave comments.
Login now