]> source.dussan.org Git - redmine.git/commitdiff
Fixed that Mantis/Trac users are not imported because of password too short (#14590).
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Wed, 25 Sep 2013 17:47:29 +0000 (17:47 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Wed, 25 Sep 2013 17:47:29 +0000 (17:47 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@12163 e93f8b46-1217-0410-a6f0-8f06a7374b81

lib/tasks/migrate_from_mantis.rake
lib/tasks/migrate_from_trac.rake

index ae8d3bb66951ffee1811d4beb4a5555b088efe9d..ffa84d4ea1202fc1a40c940e0908523bd2190b40 100644 (file)
@@ -504,15 +504,18 @@ task :migrate_from_mantis => :environment do
   Setting.cross_project_issue_relations = 1 if Setting.respond_to? 'cross_project_issue_relations'
 
   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 notification settings even if the migration fails
+    # Restore previous settings
     Setting.notified_events = old_notified_events
+    Setting.password_min_length = old_password_min_length
   end
 
 end
index 6057071824499017db3190fd88ff243c94e95451..ece967d6521bb873dfbb02cb738b0c41c55aecee 100644 (file)
@@ -767,14 +767,17 @@ namespace :redmine do
     puts
 
     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 notification settings even if the migration fails
+      # Restore previous settings
       Setting.notified_events = old_notified_events
+      Setting.password_min_length = old_password_min_length
     end
   end
 end