@@ -504,15 +504,18 task :migrate_from_mantis => :environment do | |||
|
504 | 504 | Setting.cross_project_issue_relations = 1 if Setting.respond_to? 'cross_project_issue_relations' |
|
505 | 505 | |
|
506 | 506 | old_notified_events = Setting.notified_events |
|
507 | old_password_min_length = Setting.password_min_length | |
|
507 | 508 | begin |
|
508 | 509 | # Turn off email notifications temporarily |
|
509 | 510 | Setting.notified_events = [] |
|
511 | Setting.password_min_length = 4 | |
|
510 | 512 | # Run the migration |
|
511 | 513 | MantisMigrate.establish_connection db_params |
|
512 | 514 | MantisMigrate.migrate |
|
513 | 515 | ensure |
|
514 |
# Restore previous |
|
|
516 | # Restore previous settings | |
|
515 | 517 | Setting.notified_events = old_notified_events |
|
518 | Setting.password_min_length = old_password_min_length | |
|
516 | 519 | end |
|
517 | 520 | |
|
518 | 521 | end |
@@ -767,14 +767,17 namespace :redmine do | |||
|
767 | 767 | puts |
|
768 | 768 | |
|
769 | 769 | old_notified_events = Setting.notified_events |
|
770 | old_password_min_length = Setting.password_min_length | |
|
770 | 771 | begin |
|
771 | 772 | # Turn off email notifications temporarily |
|
772 | 773 | Setting.notified_events = [] |
|
774 | Setting.password_min_length = 4 | |
|
773 | 775 | # Run the migration |
|
774 | 776 | TracMigrate.migrate |
|
775 | 777 | ensure |
|
776 |
# Restore previous |
|
|
778 | # Restore previous settings | |
|
777 | 779 | Setting.notified_events = old_notified_events |
|
780 | Setting.password_min_length = old_password_min_length | |
|
778 | 781 | end |
|
779 | 782 | end |
|
780 | 783 | end |
General Comments 0
You need to be logged in to leave comments.
Login now