]> source.dussan.org Git - redmine.git/commitdiff
Mantis importer: do not duplicate Mantis username in firstname and lastname if realna...
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Sat, 16 Feb 2008 19:28:24 +0000 (19:28 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Sat, 16 Feb 2008 19:28:24 +0000 (19:28 +0000)
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1158 e93f8b46-1217-0410-a6f0-8f06a7374b81

lib/tasks/migrate_from_mantis.rake

index 99607f2a2da40771478b084f8d0afc482e46c36f..5f9663a39d1ae7c628ec40c0c5ee59dbf59a4c81 100644 (file)
@@ -93,7 +93,7 @@ task :migrate_from_mantis => :environment do
       end\r
       \r
       def lastname\r
-        @lastname = realname.blank? ? username : realname.split[1..-1].join(' ')[0..29]\r
+        @lastname = realname.blank? ? '-' : realname.split[1..-1].join(' ')[0..29]\r
         @lastname.gsub!(/[^\w\s\'\-]/i, '')\r
         @lastname = '-' if @lastname.blank?\r
         @lastname\r