# Make sure bugs can refer bugs in other projects
Setting.cross_project_issue_relations = 1 if Setting.respond_to? 'cross_project_issue_relations'
- # Turn off email notifications
- Setting.notified_events = []
+ old_notified_events = Setting.notified_events
+ old_password_min_length = Setting.password_min_length
+ begin
+ # Turn off email notifications temporarily
+ Setting.notified_events = []
+ Setting.password_min_length = 4
+ # Run the migration
+ MantisMigrate.establish_connection db_params
+ MantisMigrate.migrate
+ ensure
+ # Restore previous settings
+ Setting.notified_events = old_notified_events
+ Setting.password_min_length = old_password_min_length
+ end
- MantisMigrate.establish_connection db_params
- MantisMigrate.migrate
end
end
prompt('Target project identifier') {|identifier| TracMigrate.target_project_identifier identifier}
puts
- # Turn off email notifications
- Setting.notified_events = []
-
- TracMigrate.migrate
+ old_notified_events = Setting.notified_events
+ old_password_min_length = Setting.password_min_length
+ begin
+ # Turn off email notifications temporarily
+ Setting.notified_events = []
+ Setting.password_min_length = 4
+ # Run the migration
+ TracMigrate.migrate
+ ensure
+ # Restore previous settings
+ Setting.notified_events = old_notified_events
+ Setting.password_min_length = old_password_min_length
+ end
end
end