Bug 333911 - csv importer: credits/debits recognition
Summary: csv importer: credits/debits recognition
Status: RESOLVED WORKSFORME
Alias: None
Product: kmymoney
Classification: Applications
Component: general (show other bugs)
Version: 4.6.4
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-26 12:45 UTC by Yasin Zähringer
Modified: 2014-04-27 00:49 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
spaces.csv (24 bytes, text/csv)
2014-04-26 12:46 UTC, Yasin Zähringer
Details
nospaces.csv (66 bytes, text/csv)
2014-04-26 12:47 UTC, Yasin Zähringer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yasin Zähringer 2014-04-26 12:45:28 UTC
The CSV importer has some issues. The first issue is highlighted by the following procedure:

Steps to reproduce:
1. Load spaces.csv in the CSV importer
2. Select the following columns: Date: 1, Payee: 2, Debits: 4, Credits: 3
3. Select the following settings: Decimal symbol: comma, date format: d m y
4. Click import and select an account (don't be confused by the fact that the default button seems to be the skip (or abort) button, so don't click enter)

What now happens is that the parser gets confused and thinks the spaces in the 'Debits' row mean that it is an withdrawal transaction of value 0. What I would expect to happen is that it disregards the spaces (maybe trim?) sees that it is a deposit transaction.


This leads to the second issue, skipping the spaces leads to a weird problem:

Steps to reproduce:
1. Load nospaces.csv
2. Import it with the same settings as before.
3. Ignore the warning that certain lines aren't as long as expected.

What happens is that all three transactions are recognized as deposits which is obviously not what should happen.

Reproducible: Always
Comment 1 Yasin Zähringer 2014-04-26 12:46:28 UTC
Created attachment 86276 [details]
spaces.csv
Comment 2 Yasin Zähringer 2014-04-26 12:47:13 UTC
Created attachment 86277 [details]
nospaces.csv
Comment 3 allan 2014-04-26 13:21:12 UTC
I don't see those results here.
Accepting that the files are incomplete, nevertheless, they import as would be expected from the parameters you gave.
In fact, with nospaces.csv, I then changed the three dates to be different, to make sure that they were importing correctly, and got the same expected results.
I'm using the development branch.
Comment 4 Yasin Zähringer 2014-04-27 00:49:56 UTC
Indeed, I can confirm that the issues do not appear with git master anymore.