diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-02-16 19:28:24 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-02-16 19:28:24 +0000 |
commit | 33493f8010fd9fdd4f1d0eb914aac82c1d02d0b3 (patch) | |
tree | 2f3e5105dfe305be132ab4a46c72b3a6610654c4 /lib/tasks | |
parent | a798a1ac4dc75f5fc64ea7a1e7808fb798f12f97 (diff) | |
download | redmine-33493f8010fd9fdd4f1d0eb914aac82c1d02d0b3.tar.gz redmine-33493f8010fd9fdd4f1d0eb914aac82c1d02d0b3.zip |
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
Diffstat (limited to 'lib/tasks')
-rw-r--r-- | lib/tasks/migrate_from_mantis.rake | 2 |
1 files changed, 1 insertions, 1 deletions
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
|