Patch #14592

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

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

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Importers
Target version:2.3.4

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

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


Related issues

Related to Redmine - Patch #14567: migrate_from_trac.rake does not convert timestamps in Tra... New

Associated revisions

Revision 12164
Added by Jean-Philippe Lang about 4 years ago

migrate_from_trac.rake does not properly parse First Name and Last Name (#14592).

Patch by Craig Rodrigues.

Revision 12211
Added by Jean-Philippe Lang about 4 years ago

Merged r12163 from trunk (#14590, #14592).

Revision 12212
Added by Jean-Philippe Lang about 4 years ago

Merged r12164 from trunk (#14592).

History

#1 Updated by Toshi MARUYAMA over 4 years ago

  • Related to Patch #14567: migrate_from_trac.rake does not convert timestamps in Trac database version 23 added

#2 Updated by Jean-Philippe Lang about 4 years ago

  • Status changed from New to Resolved
  • Target version set to 2.3.4

Patch applied in r12164, thanks!

#3 Updated by Jean-Philippe Lang about 4 years ago

  • Status changed from Resolved to Closed

Merged.

Also available in: Atom PDF