Bug 261128 - import skips empty field in csv file (different than other bug - 243405)
Summary: import skips empty field in csv file (different than other bug - 243405)
Status: RESOLVED FIXED
Alias: None
Product: kaddressbook
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-24 08:23 UTC by Robert Simmons
Modified: 2011-01-02 15:45 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
csv file with one complete entry and one with empty fields (133 bytes, text/plain)
2010-12-24 08:23 UTC, Robert Simmons
Details
Image of CSV import in git/master (KDE-PIM 4.6) (39.59 KB, image/jpeg)
2011-01-02 15:44 UTC, Tobias Koenig
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Simmons 2010-12-24 08:23:52 UTC
Created attachment 55206 [details]
csv file with one complete entry and one with empty fields

Version:           unspecified (using KDE 4.5.4) 
OS:                Linux

When I try to import a csv file from outlook (or openoffice.org) the blank fields are skipped and subsequent fields are shifted left and end up in the wrong column as seen in the preview.  I attribute this to the import code not parsing the data properly.  The blank fields are completely empty in the csv.  They do not have a "".  It seems like the import wants "" in blank fields to consider them blank rather than non-existant.  Please try to import the attached file for an example.  I would skip using "" or '' when I save the csv, but I have data in the Notes field in many of my 1000+ entries that requires either ' or ".  I will massage the csv file with a perl script to make the import happy, but it should be able to parse this type of csv seeing as it is the only way that Ooo _and_ Outlook save their csv files.

Reproducible: Always

Steps to Reproduce:
Open KAddressBook or Kontact
In the "File" menu select "Import" then "Import CSV file..."
Enter my test.csv file in the "File to import"
Look at the preview: The first person is ok, and the second has the email address in the wrong column.  Both people are deliberately simplified to demonstrate just this bug.

Actual Results:  
Data ends up in the wrong columns

Expected Results:  
Data in the correct columns/flawless import of data

OS: Linux (i686) release 2.6.35-24-generic
Compiler: cc
This box is kubuntu 10.10 with the newest KDE stable packages installed, everything is plain vanilla fresh install (this is one of the first things I tried to do on this box).
Comment 1 Tobias Koenig 2011-01-02 15:44:22 UTC
Created attachment 55470 [details]
Image of CSV import in git/master (KDE-PIM 4.6)
Comment 2 Tobias Koenig 2011-01-02 15:45:01 UTC
Hej Robert,

as you can see in the attached screenshot this bug has been fixed in KDE-PIM 4.6.

Ciao,
Tobias