6.0.0-beta1
7/18/25

[#6901] Fix re-import of CSV data
Summary Fix re-import of CSV data
Queue Turba
Queue Version 2.2
Type Enhancement
State Resolved
Priority 1. Low
Owners jan (at) horde (dot) org
Requester thomas.jarosch (at) intra2net (dot) com
Created 06/11/2008 (6246 days ago)
Due
Updated 08/26/2008 (6170 days ago)
Assigned 06/26/2008 (6231 days ago)
Resolved 08/26/2008 (6170 days ago)
Milestone
Patch No

History
08/26/2008 12:51:43 PM Thomas Jarosch State ⇒ Resolved
 
08/26/2008 12:51:24 PM Thomas Jarosch Comment #25 Reply to this comment
Looking good!



- Export and re-import of Turba data: OK

- Re-import of data exported in "Outlook format": OK

- Import of Outlook 2003 data: OK

- Import of exported data in Outlook 2003: Untested.

   German Outlook versions only recognize German field names.

- Import of Thunderbird data: OK


08/25/2008 03:20:27 PM Thomas Jarosch Comment #24 Reply to this comment
Ping?
Pong. Queued for testing this week.


08/24/2008 08:29:11 AM Jan Schneider Comment #23 Reply to this comment
Ping?
08/11/2008 10:59:44 AM CVS Commit Comment #22 Reply to this comment
Changes have been made in CVS for this ticket:

http://cvs.horde.org/diff.php/turba/docs/CHANGES?r1=1.438&r2=1.439&ty=u
08/11/2008 10:57:54 AM Jan Schneider Comment #21
Priority ⇒ 1. Low
State ⇒ Feedback
Type ⇒ Enhancement
Reply to this comment
I had to split out the outlook mappings, because they are also used 
for outlook exports. Please test what I committed.
08/11/2008 10:55:45 AM CVS Commit Comment #20 Reply to this comment
Changes have been made in CVS for this ticket:

http://cvs.horde.org/diff.php/turba/data.php?r1=1.106&r2=1.107&ty=u
06/27/2008 03:11:51 PM Thomas Jarosch Comment #19 Reply to this comment
I'd like to keep the existing entries, they shouldn't hurt.
That's fine with me. Might be a good idea to add a comment about the 
suspected source of the values i.e. "Outlook 2000 or earlier" so we 
can kill them in Horde 5+ :-)


06/26/2008 10:27:46 AM Jan Schneider Comment #18
State ⇒ Assigned
Assigned to Jan Schneider
Reply to this comment
I'd like to keep the existing entries, they shouldn't hurt.
06/20/2008 02:59:05 PM Thomas Jarosch Comment #17 Reply to this comment
Any reason not to keep the old mappings?
I was not able to verify them. Chuck commited the original mappings 
three years ago, maybe he still got the original email with the field 
output from Francois, if at all. Anyhow, those field names are from 
Outlook 2000 or earlier, so I think it's safe to remove them.
And if you remove them, why not the internetfreebusy entry?
Bug :-) I was masochistic enough to map the fields and somehow 
overseen it during review of the patch.



Have a nice weekend,

Thomas


06/20/2008 02:44:59 PM Jan Schneider Comment #16 Reply to this comment
Any reason not to keep the old mappings? And if you remove them, why 
not the internetfreebusy entry?
06/20/2008 02:44:09 PM Jan Schneider Deleted Original Message
 
06/20/2008 02:29:40 PM Thomas Jarosch Patch ⇒ Yes
 
06/20/2008 02:29:14 PM Thomas Jarosch Comment #15
New Attachment: data-improve-outlook.import.patch Download
Reply to this comment
Here's a patch for CVS HEAD to support Outlook 2003 properly.

While I was at it, I also added support for Entourage and Thunderbird :-)


06/20/2008 02:27:39 PM Thomas Jarosch Comment #14 Reply to this comment
Thunderbird fields:



First Name,Last Name,Display Name,Nickname,Primary Email,Secondary 
Email,Work Phone,Home Phone,Fax Number,Pager Number,Mobile Number,Home 
Address,Home Address 2,Home City,Home State,Home ZipCode,Home 
Country,Work Address,Work Address 2,Work City,Work State,Work 
ZipCode,Work Country,Job Title,Department,Organization,Web Page 1,Web 
Page 2,Birth Year,Birth Month,Birth Day,Custom 1,Custom 2,Custom 
3,Custom 4,Notes


06/20/2008 02:26:29 PM Thomas Jarosch Comment #13 Reply to this comment
Outlook 2003 fields supplied by Francois Marier:



"Title","First Name","Middle Name","Last 
Name","Suffix","Company","Department","Job Title","Business 
Street","Business Street 2","Business Street 3","Business 
City","Business State","Business Postal Code","Business Country","Home 
Street","Home Street 2","Home Street 3","Home City","Home State","Home 
Postal Code","Home Country","Other Street","Other Street 2","Other 
Street 3","Other City","Other State","Other Postal Code","Other 
Country","Assistant's Phone","Business Fax","Business Phone","Business 
Phone 2","Callback","Car Phone","Company Main Phone","Home Fax","Home 
Phone","Home Phone 2","ISDN","Mobile Phone","Other Fax","Other 
Phone","Pager","Primary Phone","Radio Phone","TTY/TDD 
Phone","Telex","Account","Anniversary","Assistant's Name","Billing 
Information","Birthday","Business Address PO 
Box","Categories","Children","Directory Server","E-mail 
Address","E-mail Type","E-mail Display Name","E-mail 2 
Address","E-mail 2 Type","E-mail 2 Display Name","E-mail 3 
Address","E-mail 3 Type","E-mail 3 Display Name","Gender","Government 
ID Number","Hobby","Home Address PO Box","Initials","Internet Free 
Busy","Keywords","Language","Location","Manager's 
Name","Mileage","Notes","Office Location","Organizational ID 
Number","Other Address PO 
Box","Priority","Private","Profession","Referred 
By","Sensitivity","Spouse","User 1","User 2","User 3","User 4","Web 
Page"


06/16/2008 04:29:20 PM Thomas Jarosch Comment #12 Reply to this comment
No, I don't have an Entourage license.
Ok, thanks. I wrote "Francois Marier" an email, he submitted the 
mappings in the first place.


06/16/2008 04:18:55 PM Chuck Hagenbuch Comment #11
Taken from Chuck Hagenbuch
Reply to this comment
No, I don't have an Entourage license.
06/16/2008 04:17:50 PM Thomas Jarosch Taken from Jan Schneider
Assigned to Chuck Hagenbuch
State ⇒ Feedback
 
06/16/2008 04:17:29 PM Thomas Jarosch Comment #10 Reply to this comment
No, and I'm not sure if this mapping still holds for any recent
Outlook versions anyway. It was added back at (probably) Office 97 or
Office 2000 times.
A friend of mine sent me the English field names for Entourage, which 
is Outlook for MacOS:



"First Name        Last Name        Title        Suffix        Nickname        Company        Job 
Title        Dept        Work Street Address        Work City        Work State        Work Zip        Work 
Country/Region        Work URL        Home Street Address        Home City        Home State        Home 
Zip        Home Country/Region        Home URL        Home Phone 1        Home Phone 2        Home 
Fax        Work Phone 1        Work Phone 2        Work Fax        Pager        Mobile Phone        Main 
Phone        Assistant Phone        Custom Phone 1        Custom Phone 2        Custom Phone 
3        Custom Phone 4        Email Address 1        Email Address 2        Email Address 3        Email 
Address 4        Email Address 5        Email Address 6        Email Address 7        Email 
Address 8        Email Address 9        Email Address 10        Email Address 11        Email 
Address 12        Email Address 13        Instant Messaging 1        Instant Messaging 
2        Instant Messaging 3        Instant Messaging 4        Instant Messaging 5        Instant 
Messaging 6        Instant Messaging 7        Instant Messaging 8        Instant Messaging 
9        Instant Messaging 10        Instant Messaging 11        Instant Messaging 
12        Instant Messaging 13        Custom 1        Custom 2        Custom 3        Custom 4        Custom 
5        Custom 6        Custom 7        Custom 8        Custom date 1        Custom date 
2        Spouse        Birthday        Anniversary        Notes        Age        Astrology 
sign        Bloodtype        Furigana Company Name        Furigana First Name        Furigana Last 
Name        Furigana Spouse Name        Interests"



I especially like "Bloodtype" :o)



As you can see, some mappings would be needed. I really would like to 
see the CSV output of an American Outlook. Chuck, do you have access 
to that? ;-)


06/13/2008 10:30:02 AM Jan Schneider Comment #9 Reply to this comment
No, and I'm not sure if this mapping still holds for any recent 
Outlook versions anyway. It was added back at (probably) Office 97 or 
Office 2000 times.
06/13/2008 08:43:21 AM Thomas Jarosch Comment #8 Reply to this comment
The point of the $outlook_mapping hash was, to automatically map
fields exported from Outlook that have different names than Turba. I
have removed all fields that already have the same names like our
current default attributes.
Thanks, Jan. Was the given name field previoulsy called "first_name" in Turba?

Or do you have an English Outlook version to verify the given name 
field is not called "first_name" in Outlook's CSV export?


06/13/2008 08:39:20 AM Jan Schneider Comment #7
State ⇒ Resolved
Taken from Michael Rubinsky
Reply to this comment
The point of the $outlook_mapping hash was, to automatically map 
fields exported from Outlook that have different names than Turba. I 
have removed all fields that already have the same names like our 
current default attributes.
06/13/2008 08:37:23 AM CVS Commit Comment #6 Reply to this comment
Changes have been made in CVS for this ticket:

http://cvs.horde.org/diff.php/turba/data.php?r1=1.103&r2=1.104&ty=u
06/13/2008 07:18:02 AM Thomas Jarosch Comment #5 Reply to this comment
So we're looking to map firstname to the turba field first_name, and
it should be the opposite?
Yes. Just export some contacts via CSV. You'll find "firstname" in the 
headerline. If you re-import them, Turba is unable to automatically 
map "first_name" to the proper given name field. If you look at the 
standard attributes.php file,

it's spelled "firstname", right?
Why does the patch remove the pgp and smime mappings?
They map from the same name to the same name :-)

-> No mapping done.


06/12/2008 07:42:37 PM Chuck Hagenbuch Comment #4 Reply to this comment
So we're looking to map firstname to the turba field first_name, and 
it should be the opposite?



Why does the patch remove the pgp and smime mappings?
06/12/2008 07:17:42 AM Thomas Jarosch Comment #3 Reply to this comment
I'm not sure I understand the issue you are describing. When you
import CSV data into Turba, regardless of the original source, you
can select/edit the field mappings yourself?
Yes, this is works fine.
Can you give a more descriptive use case for when this fails?
Turba exports your given name as "firstname". If you reimport the same 
CSV file exported by Turba, the field "firstname" will currently be 
translated to "first_name" and Turba is then unable to automatically 
match the CSV field to the corresponding Turba key. As far as I was 
able to google it, Outlook uses the field "first_name" and some of the 
mapping array values should be flipped.


06/11/2008 11:16:00 PM Michael Rubinsky Comment #2
State ⇒ Feedback
Reply to this comment
I'm not sure I understand the issue you are describing. When you 
import CSV data into Turba, regardless of the original source, you can 
select/edit the field mappings yourself?



Can you give a more descriptive use case for when this fails?
06/11/2008 08:26:36 PM Chuck Hagenbuch State ⇒ Assigned
 
06/11/2008 08:26:29 PM Chuck Hagenbuch Assigned to Jan Schneider
Assigned to Michael Rubinsky
 
06/11/2008 04:22:27 PM Thomas Jarosch Comment #1
Priority ⇒ 1. Low
State ⇒ Unconfirmed
New Attachment: turba-fix-reimport.patch
Patch ⇒ No
Milestone ⇒
Queue ⇒ Turba
Summary ⇒ Fix re-import of CSV data
Type ⇒ Bug
Reply to this comment
Hello together,



if you export contacts via CSV and re-import the same file again,

some fields won't get mapped automatically. This is due the wrong

assignment of Outlook field mapping, changing "firstname" into "first_name".



Attached patch fixes the issue. I also removed fields mapping to the 
same name.



I tried to have a look at Outlook's field names, unfortunately the 
field names are localized (sic!) so I only see German field names. 
Would be nice if someone with an English Outlook version could check 
the field names.



Cheers,

Thomas


Saved Queries