Bug 242063 - CSV import does not work (when you don't hit the enter key)
Summary: CSV import does not work (when you don't hit the enter key)
Status: RESOLVED FIXED
Alias: None
Product: kaddressbook
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-18 12:13 UTC by Martin Koller
Modified: 2010-06-19 17:00 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Koller 2010-06-18 12:13:29 UTC
Version:           unspecified (using Devel) 
OS:                Linux

I try to import a simple CSV file but the import only gives an error dialog when I click "OK":
"You have to assign at least one column."

There are no columns shown somewhere in that dialog, so I can not assign anything.


Aahaaa - I found the problem: I need to press the Enter key in the filename
field, which I did not do, as I typed in the full name /tmp/somename and pressed the TAB key.

This should be changed to react also on this situation.

Reproducible: Always




OS: Linux (i686) release 2.6.31.12-0.2-desktop
Compiler: gcc

openSuse 11.2
KDE 4.5 beta 2
Comment 1 Tobias Koenig 2010-06-18 15:30:46 UTC
Hej,

sorry but I can't follow you here...
Can you please give a detailed description what exactly you did?
Which buttons you clicked, which dialog is visible etc...

Ciao,
Tobias
Comment 2 Martin Koller 2010-06-18 22:51:59 UTC
In kaddressbook I click File->Import->Import CSV File ... and the import dialog appears.
I click into the "File to import" line edit and type "/tmp/somefile" and click on "Delimiter/Semicolon" and the I click on OK.
=> Error Dialog: "You have to assign at least one column." appears, but I don't know why as the dialog is otherwise empty. There is no column to assign (assign a column to what?)

When I click again into the "File to import" line edit and hit the Enter key, suddenly the dialog is filled with data from the file (but with the KDE snapshot from today now not only the dialog gets filled but also the error dialog immediately appears, which is also not good).

So the main question is: What is the user supposed to click or press _when_ so that he can select what is needed before the action can be run with the OK button ?

And as this is not obvious, it should be made more clear (the work flow should be improved)
Comment 3 Tobias Koenig 2010-06-19 14:55:25 UTC
SVN commit 1139925 by tokoe:

Do not forward the 'return pressed' signal of the url
selector to the 'Ok' button of the dialog.

BUG: 242063


 M  +1 -0      csvimportdialog.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1139925
Comment 4 Tobias Koenig 2010-06-19 14:59:41 UTC
Hej Martin,

this bug is caused by a real issue in the code and a misuse.
You always have to select a file by either entering a file name _and_ hitting
the return key or using the file selection dialog. If you just enter the
file name but do not hit enter, then the dialog won't load the file and allow
you to define the columns. This was the misuse issue.

The issue in the code was that when hitting return in the url requester widget,
the event has been forwarded to the Ok button which brought up the 'You have to assign
at least on column' error message. This is corrected now by the above commit.
Will backport it to 4.4 branch as well.

Ciao,
Tobias
Comment 5 Martin Koller 2010-06-19 17:00:57 UTC
But AFAI understand it, when the user does not press enter, and only the OK button, the error dialog still pops up.

What about at least doing the file load when the user hits OK and the file was not loaded before ?
Then the dialog would at least show the columns and in the next step the user knows what to do.