summaryrefslogtreecommitdiffstats
path: root/lib/tasks
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2013-09-25 17:49:58 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2013-09-25 17:49:58 +0000
commit4a36e09d4947425b41dd4d72f6a1a13146922878 (patch)
tree8873d83514e68d9d6ce1538b62f879948bfb15f0 /lib/tasks
parent5e2eedf2c5fd6a4732fd9c6507145c4aa0761c67 (diff)
downloadredmine-4a36e09d4947425b41dd4d72f6a1a13146922878.tar.gz
redmine-4a36e09d4947425b41dd4d72f6a1a13146922878.zip
migrate_from_trac.rake does not properly parse First Name and Last Name (#14592).
Patch by Craig Rodrigues. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@12164 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib/tasks')
-rw-r--r--lib/tasks/migrate_from_trac.rake4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/tasks/migrate_from_trac.rake b/lib/tasks/migrate_from_trac.rake
index ece967d65..a429a944e 100644
--- a/lib/tasks/migrate_from_trac.rake
+++ b/lib/tasks/migrate_from_trac.rake
@@ -249,8 +249,8 @@ namespace :redmine do
if name_attr = TracSessionAttribute.find_by_sid_and_name(username, 'name')
name = name_attr.value
end
- name =~ (/(.*)(\s+\w+)?/)
- fn = $1.strip
+ name =~ (/(\w+)(\s+\w+)?/)
+ fn = ($1 || "-").strip
ln = ($2 || '-').strip
u = User.new :mail => mail.gsub(/[^-@a-z0-9\.]/i, '-'),