GNOME Bugzilla – Bug 341414
QIF Import: Changing account seperator breaks saved account mappings
Last modified: 2018-06-29 21:03:54 UTC
Please describe the problem: If the account seperator is ever changed, the "qif-accounts-map" file is not updated or checked. This causes duplicate accounts to be created when importing fields that were saved in "qif-accounts-map" prior to changing the account seperator. Steps to reproduce: 1. Import a QIF file allowing it to save some of the entries in "qif-accounts-map" 2. Change the account seperator (i.e.: from ":" to "/"). 3. Import a QIF file with one of the items saved in "qif-accounts-map" Actual results: If I had an entry for the account Expenses:Auto:Gas cached in "qif-accounts-map", then changed the account seperator to "/". After the next import, new gas charges would go into a new account entitled "Expenses:Auto:Gas" <-- those ":"'s don't represent an account hierarchy, they're part of the name of a single account. Expected results: I would expect those gas charges to go into Expenses/Auto/Gas Does this happen every time? Yes Other information: I would think this might also apply to renaming accounts, I haven't tested it though. Even if the entries in "qif-accounts-map" for accounts that didn't exist were simply ignored and removed, it would be an improvement.
It's a larger problem than just here. There are a number of places where the account information is stored by "name" instead of "guid", and changing the account separator breaks.
I don't know which other parts are concerned, but for the importer modules, this only concerns QIF. The other import modules (HBCI, OFX, MT940) identify the accounts by their GUIDs, hence they don't store the separator character.
Well, I meant larger than just QIF import, but I wasn't implying it was in other importers. I don't remember: does the OFX/HBCI transaction matcher store the bayesian data of target accounts by name or guid? Just add this to yet another reason the QIF importer needs to get updated and integrated into the generic import infrastructure.
Development on 1.8.x has stopped and this versions won't be maintained anymore. Does this problem still occur in 2.0.x versions of gnucash? Re comment#3: The generic-import matcher stores the account by the GUID.
I'm pretty sure this is still an issue, because the QIF importer still doesn't use the generic importer, and it does store full account-name strings in the mapfile.
Created attachment 104549 [details] [review] Proposed patch This patch adds an entry to the qif-accounts-map file, saving the account separator that was in use when the file was written. If the account separator is later changed by the user, the importer will notice the change and will adjust the saved GnuCash account names accordingly. This change is backward compatible: the existing qif-account-map file format is respected, and the file will be automatically upgraded upon completion of an import. The patch has also been designed to not confuse earlier versions of GnuCash should the user decide to downgrade.
Committed as r17030. Awaiting backport for 2.2.
Applied to branches/2.2 as r17096 for GnuCash 2.2.5. Thanks a lot!
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=341414. Please update any external references or bookmarks.