##// END OF EJS Templates
Ensure Tranc and Mantis importers don't reset global notification settings (#13989)....
Jean-Baptiste Barth -
r11565:2b3111122e0a
parent child
Show More
@@ -503,10 +503,17 task :migrate_from_mantis => :environment do
503 503 # Make sure bugs can refer bugs in other projects
504 504 Setting.cross_project_issue_relations = 1 if Setting.respond_to? 'cross_project_issue_relations'
505 505
506 # Turn off email notifications
506 old_notified_events = Setting.notified_events
507 begin
508 # Turn off email notifications temporarily
507 509 Setting.notified_events = []
508
510 # Run the migration
509 511 MantisMigrate.establish_connection db_params
510 512 MantisMigrate.migrate
513 ensure
514 # Restore previous notification settings even if the migration fails
515 Setting.notified_events = old_notified_events
516 end
517
511 518 end
512 519 end
@@ -762,10 +762,16 namespace :redmine do
762 762 prompt('Target project identifier') {|identifier| TracMigrate.target_project_identifier identifier}
763 763 puts
764 764
765 # Turn off email notifications
765 old_notified_events = Setting.notified_events
766 begin
767 # Turn off email notifications temporarily
766 768 Setting.notified_events = []
767
769 # Run the migration
768 770 TracMigrate.migrate
771 ensure
772 # Restore previous notification settings even if the migration fails
773 Setting.notified_events = old_notified_events
774 end
769 775 end
770 776 end
771 777
General Comments 0
You need to be logged in to leave comments. Login now