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:
parent
a798a1ac4d
commit
33493f8010
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue