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
This commit is contained in:
Jean-Philippe Lang 2008-02-16 19:28:24 +00:00
parent a798a1ac4d
commit 33493f8010
1 changed files with 1 additions and 1 deletions

View File

@ -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