Bug 420557 - Broken transaction group after CSV import
Summary: Broken transaction group after CSV import
Status: RESOLVED FIXED
Alias: None
Product: skrooge
Classification: Applications
Component: general (other bugs)
Version First Reported In: Trunk from git
Platform: Other Linux
: NOR normal
Target Milestone: 25.1.0
Assignee: Stephane MANKOWSKI
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-04-25 10:03 UTC by Bernhard Scheirle
Modified: 2020-04-25 14:11 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bernhard Scheirle 2020-04-25 10:03:38 UTC
Hi,

transaction groups are not properly imported from csv files. 
This depends on the order of the operations in the csv file.

Following csv file will be imported correctly:

date;account;idgroup;idtransaction;value;unit
2020-04-04;A;1;2;1;€
2020-04-04;A;1;2;2;€
2020-04-04;B;1;0;3;Share

Results in 2 Transactions: A split transaction (containing 1+2€) in account A, and a transaction in account B (3 Shares).
Both transactions are grouped together.


If we now change the order and move the transaction in account B to the top, the import will be incorrect:

date;account;idgroup;idtransaction;value;unit
2020-04-04;B;1;0;3;Share
2020-04-04;A;1;2;1;€
2020-04-04;A;1;2;2;€

Results in 2 Transactions: A split transaction (containing 1+2€) in account A, and a transaction in account B (3 Shares).
But these transactions are not grouped together.

Regards
Bernhard
Comment 1 Stephane MANKOWSKI 2020-04-25 14:11:17 UTC
Git commit dc2f52195c88d3a2c3ec83cab4cbcb0f086390e3 by Stephane Mankowski.
Committed on 25/04/2020 at 14:10.
Pushed by smankowski into branch 'master'.

Broken transaction group after CSV import

M  +1    -0    CHANGELOG
M  +1    -1    plugins/import/skrooge_import_csv/skgimportplugincsv.cpp
A  +4    -0    tests/input/skgtestimportcsv/420557_1.csv
A  +4    -0    tests/input/skgtestimportcsv/420557_2.csv
M  +44   -0    tests/skgbankmodelertest/skgtestimportcsv.cpp

https://commits.kde.org/skrooge/dc2f52195c88d3a2c3ec83cab4cbcb0f086390e3