Project

General

Profile

Actions

Patch #14592

closed

migrate_from_trac.rake does not properly parse First Name and Last Name

Added by Craig Rodrigues over 11 years ago. Updated about 11 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Importers
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:

Description

In migrate_from_trac.rake, there is this code:

name =~ (/(.*)(\s+\w+)?/)
fn = $1.strip
ln = ($2 || '-').strip

The regular expression breaking up name is wrong. (.*) will match the whole
string, so the entire name is set to $1, so the entire name gets assigned
to fn, and ln is blank.

The attached patch fixes that. Also, I ran into one case where
the name was empty, so $1.strip threw an exception. I fixed that too with
the attached patch.

Related to #14567


Files

migrate_from_trac.rake.txt (600 Bytes) migrate_from_trac.rake.txt Craig Rodrigues, 2013-08-01 09:07

Related issues

Related to Redmine - Patch #14567: migrate_from_trac.rake does not convert timestamps in Trac database version 23New

Actions
Actions

Also available in: Atom PDF