Bug 320298 - Default automatic format detection while importing a file leads to wrong entries creation
Summary: Default automatic format detection while importing a file leads to wrong entr...
Status: RESOLVED FIXED
Alias: None
Product: skrooge
Classification: Applications
Component: general (show other bugs)
Version: 1.7.1
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Stephane MANKOWSKI
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-26 10:16 UTC by sdkfz262
Modified: 2013-06-09 15:19 UTC (History)
2 users (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 sdkfz262 2013-05-26 10:16:07 UTC
Hi,
Importing a .qif file in 1.7.1 version (no problem with 1.6.0 or earlier version) leads to wrong posting  creation:

- name of the file is handled as name of the account, and leads to an account creation (in 1.6.0 import only created corresponding lines in selected account (if any), what is the correct behaviour I think)
- date of each posting was set to "today": it seems that dates in the file were just not taken into account

I checked the .qif file, and found no formatting error. I tried first with a .qif "for Money" file, with US date format, then with a .qif "for Quicken" file containing the same postings (still with US date format). Both tries lead to the same result.

Interesting thing is, that when I changed (in import settings for .qif) from "automatic detection" (default value) to "détection automatique" (means the same, but in french - and yes I have two different values for the same "behaviour") I got rid of the date issue, but "account creation" remains.

Reproducible: Always

Steps to Reproduce:
1. import a .qif file, without changing default settings for qif import
2. 
3.
Actual Results:  
- All postings have their dates set to "today", regardless of what is held in the file
- All postings are created for an account named after the name of the file

Expected Results:  
- Postings dates taken from corresponding dates in the file
- Postings created in the account displayed in "postings" tab while importing, if any
Comment 1 Stephane MANKOWSKI 2013-05-26 20:11:04 UTC
Hi,

I am able to reproduce the bug for the date and will deliver the correction.

For the account creation, QIF import never created operations in selected account.
Skrooge uses the name of the file to find the most appropriate account.
If in the file name, you have the number of an existing account, this account will be selected.
Comment 2 Stephane MANKOWSKI 2013-05-26 20:13:05 UTC
Git commit 9d3b483c5eef5608324879c627a70d7b50918b40 by Stephane Mankowski.
Committed on 26/05/2013 at 22:11.
Pushed by smankowski into branch 'master'.
Default automatic format detection while importing a file leads to wrong entries creation

M  +1    -0    CHANGELOG
M  +2    -2    plugins/skrooge/skrooge_importexport/skgimportexportplugin.cpp

http://commits.kde.org/skrooge/9d3b483c5eef5608324879c627a70d7b50918b40
Comment 3 sdkfz262 2013-05-26 23:14:45 UTC
Hi,

Thanks for the quick reply!

Regarding the "account" selection, I'm a bit surprised, since it's something I found very convenient (I'm sure it worked in 1.6.0, and my file naming convention has not changed - I don't change the one proposed at saving)
Comment 4 Stephane MANKOWSKI 2013-05-27 06:13:40 UTC
(In reply to comment #3)
> Hi,
> 
> Thanks for the quick reply!
> 
> Regarding the "account" selection, I'm a bit surprised, since it's something
> I found very convenient (I'm sure it worked in 1.6.0, and my file naming
> convention has not changed - I don't change the one proposed at saving)

Could you give me an example of your file name?
Comment 5 sdkfz262 2013-05-27 21:48:33 UTC
(In reply to comment #4)
> Could you give me an example of your file name?

Here it is: T_cpte_XXXXX_YYYYYYY_du_21-05-2013_au_24-05-2013.qif (XXXXX and YYYYYYY are the ID of my bank account).
Comment 6 Stephane MANKOWSKI 2013-06-09 15:19:26 UTC
Git commit 8b885b67d3c8a32ec279cd7158e2518b6007179a by Stephane Mankowski.
Committed on 09/06/2013 at 17:19.
Pushed by smankowski into branch 'master'.
Correction for account selection

M  +2    -2    skgbankmodeler/skgimportexportmanager.cpp
A  +6    -0    tests/input/skgtestimportqif/LA-1234567@ing.qif
R  +1    -1    tests/scripts/skgtestimportqif1.sh [from: tests/scripts/skgtestimportqif.sh - 096% similarity]
A  +13   -0    tests/scripts/skgtestimportqif2.sh
M  +6    -3    tests/skgbankmodelertest/CMakeLists.txt
R  +1    -97   tests/skgbankmodelertest/skgtestimportqif1.cpp [from: tests/skgbankmodelertest/skgtestimportqif.cpp - 089% similarity]
A  +194  -0    tests/skgbankmodelertest/skgtestimportqif2.cpp     [License: GPL (v2+)]

http://commits.kde.org/skrooge/8b885b67d3c8a32ec279cd7158e2518b6007179a