Actions
Patch #14592
closedmigrate_from_trac.rake does not properly parse First Name and Last Name
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
Related issues
Actions