After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 341414 - QIF Import: Changing account seperator breaks saved account mappings
QIF Import: Changing account seperator breaks saved account mappings
Status: VERIFIED FIXED
Product: GnuCash
Classification: Other
Component: Import - QIF
git-master
Other All
: Normal normal
: ---
Assigned To: Derek Atkins
Derek Atkins
Depends on:
Blocks: backport
 
 
Reported: 2006-05-11 13:48 UTC by Mark McEver
Modified: 2018-06-29 21:03 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Proposed patch (9.28 KB, patch)
2008-02-06 11:28 UTC, Charles Day
committed Details | Review

Description Mark McEver 2006-05-11 13:48:41 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.
Comment 1 Derek Atkins 2006-05-11 14:05:38 UTC
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.
Comment 2 Christian Stimming 2006-05-17 11:13:55 UTC
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.
Comment 3 Derek Atkins 2006-05-17 13:12:38 UTC
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.
Comment 4 Christian Stimming 2006-09-13 13:23:36 UTC
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.
Comment 5 Derek Atkins 2006-09-13 13:26:07 UTC
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.
Comment 6 Charles Day 2008-02-06 11:28:04 UTC
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.
Comment 7 Charles Day 2008-03-13 23:33:53 UTC
Committed as r17030. Awaiting backport for 2.2.
Comment 8 Andreas Köhler 2008-04-20 19:33:46 UTC
Applied to branches/2.2 as r17096 for GnuCash 2.2.5.
Thanks a lot!
Comment 9 John Ralls 2018-06-29 21:03:54 UTC
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.