From 33493f8010fd9fdd4f1d0eb914aac82c1d02d0b3 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 16 Feb 2008 19:28:24 +0000 Subject: [PATCH] Mantis importer: do not duplicate Mantis username in firstname and lastname if realname is blank. git-svn-id: http://redmine.rubyforge.org/svn/trunk@1158 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- lib/tasks/migrate_from_mantis.rake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/tasks/migrate_from_mantis.rake b/lib/tasks/migrate_from_mantis.rake index 99607f2a2..5f9663a39 100644 --- a/lib/tasks/migrate_from_mantis.rake +++ b/lib/tasks/migrate_from_mantis.rake @@ -93,7 +93,7 @@ task :migrate_from_mantis => :environment do end def lastname - @lastname = realname.blank? ? username : realname.split[1..-1].join(' ')[0..29] + @lastname = realname.blank? ? '-' : realname.split[1..-1].join(' ')[0..29] @lastname.gsub!(/[^\w\s\'\-]/i, '') @lastname = '-' if @lastname.blank? @lastname -- 2.39.5