KMM draft bug - KMM does not import all memo data when opening GnuCash file

adatchery adatchery at protonmail.com
Thu Dec 30 15:45:47 GMT 2021


I have not posted a bug before so I thought I would send a draft before posting this on https://bugs.kde.org/. If I am missing anything, or this does not make sense, please let me know.

Patrick

----

KMyMoney does not import all memo data when opening GnuCash file

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) (https://github.com/KDE/kmymoney/blob/master/kmymoney/plugins/gnc/import/mymoneygncreader.cpp) 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)

https://bugs.kde.org/show_bug.cgi?id=429977

“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 a simple GnuCash xml file to help show which GnuCash memos are getting used in KMM.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kmymoney/attachments/20211230/2bf130c9/attachment.htm>


More information about the KMyMoney mailing list