Bug 447776 - KMyMoney does not import all memo data when opening GnuCash file
Summary: KMyMoney does not import all memo data when opening GnuCash file
Status: REPORTED
Alias: None
Product: kmymoney
Classification: Applications
Component: importer (show other bugs)
Version: 5.1.1
Platform: Other Linux
: NOR wishlist
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-01-01 14:48 UTC by adatchery
Modified: 2022-01-01 14:55 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
GnuCash xml file to test KMM import of Memos (14.06 KB, application/x-gnucash)
2022-01-01 14:48 UTC, adatchery
Details
GnuCash vs KMyMoney sample file import data comparison (166.29 KB, application/pdf)
2022-01-01 14:55 UTC, adatchery
Details

Note You need to log in before you can comment on or make changes to this bug.
Description adatchery 2022-01-01 14:48:12 UTC
Created attachment 145010 [details]
GnuCash xml file to test KMM import of Memos

SUMMARY

***

STEPS TO REPRODUCE
1. Open a GnuCash xml file that contains transactions with a transaction level Memo (a Note in GnuCash)
Case a) 2.  Do not select “Use transaction notes on non-split transactions” at conversion.
Case b) 2.  Do select “Use transaction notes on non-split transactions” at conversion.

OBSERVED RESULT

Case a) In KMyMoney ledgers or reports, notice that for non-split transactions, the GnuCash transaction level Notes data is lost (*1).
Case b) In KMyMoney ledgers or reports, notice that for non-split transactions, that GnuCash split level Memo data is lost.
For either case, for split transactions, notice that the GnuCash transaction level Note data is lost (*1).

EXPECTED RESULT

From what I can tell from documentation, this is the expected result, and there is not a code bug.

An enhancement would be to preserve all note/memo data from the GnuCash file, possibly by merging data.


SOFTWARE/OS VERSIONS

Windows: Not Tested
macOS: Not Tested
Linux/KDE Plasma: KMyMoney Version 5.1.1 on Linux MX-21_KDE_x64 Wildflower 
KDE Plasma Version: 5.20.5
KDE Frameworks Version: 5.78.0
Qt Version: Qt 5.15.2 (built against 5.15.2)

ADDITIONAL INFORMATION

The basic issue is that GnuCash allows split Memo entries in addition to a transaction level Memo for a “non-split” entry, whereas KMM only allows entry of one Memo.  For split entries, GnuCash also allows a split entry on the main account in addition to the transaction Memo.  The current KMM code looses the extra the data on import (kind-off, per below), with a selection of which data to keep for non-split transactions.

Interestingly, the GnuCash importer (GNC Plugin) does save all the data.  It appears looking at the KMM XML data file that transaction level GnuCash notes are saved (for both split and non-split entries), as a Transaction Memo in the KMM XML file, but this Memo is apparently not used by KMM, which instead uses split level data for its displayed transaction Memos (realizing that even entries shown as “non-split” are stored as split internally in the data file).  So all the data is there stored in the file, but some if it can not be seen or edited (that I can see), so is essentially lost.

One possible method to retain all data would be to join the data, so the displayed KMM Transaction Memo would be something like “GnuCash-Transaction-Note / GnuCash-split-Memo” if there are both types of note, or just the non-blank note if one is blank.  For multi-split entries, the Transaction-Note/ split-Memo conjunction would would also become part of the split line used for display of the Transaction Memo.  It would make sense to have a option to choose this, similar to (or in replacement of) “Use transaction notes on non-split transactions”

Similar to bug 429977
(which is for QIF import)
“Main memo in qif import of splitted transactions get the memo value of the first splitted one instead of none(edit)”

GNC Plugin is at:
https://github.com/KDE/kmymoney/blob/master/kmymoney/plugins/gnc/import/mymoneygncreader.cpp

I have created and attached a simple GnuCash xml file to help show which GnuCash memos are getting used in KMM.  It is fairly straight forward to look at the GnuCash xml file in a text editor, and the new KMM file and see what is being saved and how.
Comment 1 adatchery 2022-01-01 14:55:19 UTC
Created attachment 145011 [details]
GnuCash vs KMyMoney sample file import data comparison