Bug 395040

Summary: CSV Export of Investment Accounts does not issue transactions on non-English kmymoney installations
Product: [Applications] kmymoney Reporter: Ralf Habacker <ralf.habacker>
Component: exporterAssignee: KMyMoney Devel Mailing List <kmymoney-devel>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: 4.7.0   
Target Milestone: ---   
Platform: Other   
OS: All   
Latest Commit: Version Fixed In: 4.8.3, 5.0.2
Sentry Crash Report:
Bug Depends on:    
Bug Blocks: 395025    
Attachments: kmymoney test file

Description Ralf Habacker 2018-06-05 06:59:07 UTC
Created attachment 113084 [details]
kmymoney test file

Exporting an investment account to a csv file on a system using kmymoney with non english translation creates a file with wrong header and no output.

How to reproduce:
1. Open appended kmymoney file
2. Choose file->export->csv
3. Choose output file
3. Choose account "invest"
4. select ',' as delimiter
5. export the account

The generated file contains a header line with columns targeted for non investment accounts and no data lines

Additional information:
The problem seems to be a regression of the implementation for bug 317614
Comment 1 Ralf Habacker 2018-06-05 07:12:39 UTC
This bug prevents the fixes from bug 395025 from being tested
Comment 2 Ralf Habacker 2018-06-05 07:13:15 UTC
Git commit 97d1683c0329326a82bbf1e445cab37f9f4474ee by Ralf Habacker.
Committed on 05/06/2018 at 07:13.
Pushed by habacker into branch '4.8'.

Fix 'CSV Export of Investment Accounts does not issue transactions on non-English kmymoney installations'

The former account type check used the translated account type, which works
only on english translated kmymoney instances.
FIXED-IN:4.8.3

M  +1    -1    kmymoney/plugins/csvexport/csvwriter.cpp

https://commits.kde.org/kmymoney/97d1683c0329326a82bbf1e445cab37f9f4474ee
Comment 3 Thomas Baumgart 2018-06-05 07:41:21 UTC
Git commit f84f2b4b78591b554887c86a76a815c1eef45a5e by Thomas Baumgart.
Committed on 05/06/2018 at 07:41.
Pushed by tbaumgart into branch 'master'.

Fix CSV Export of Investment Accounts

The CSV-Export does not issue transactions in non-English installations.
Fixed by using the accountType() member instead of a possibly translated
string.

cherry-picked from 97d1683c0329326a82bbf1e445cab37f9f4474ee and adjusted
to master

M  +1    -1    kmymoney/plugins/csv/export/csvwriter.cpp

https://commits.kde.org/kmymoney/f84f2b4b78591b554887c86a76a815c1eef45a5e