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 511006 - Commodity creation skipped due to saved mappings
Commodity creation skipped due to saved mappings
Status: VERIFIED FIXED
Product: GnuCash
Classification: Other
Component: Import - QIF
2.2.x
Other All
: Normal minor
: ---
Assigned To: Derek Atkins
Derek Atkins
Depends on:
Blocks: backport
 
 
Reported: 2008-01-21 11:22 UTC by Charles Day
Modified: 2018-06-29 22:00 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
QIF file demonstrating the bug (173 bytes, text/plain)
2008-01-21 13:03 UTC, Charles Day
  Details
Proposed patch (1.79 KB, patch)
2008-01-22 05:38 UTC, Charles Day
committed Details | Review

Description Charles Day 2008-01-21 11:22:56 UTC
Please describe the problem:
When QIF securities are imported, new GnuCash commodities may need to be created. However, commodity creation is skipped for those QIF securities that have ever been imported in the past - even if they were originally imported into a different GnuCash data file.

Steps to reproduce:
1. Make a backup your qif-accounts-map file, then remove the original.
2. Start GnuCash with --nofile.
3. Import a QIF file containing a transaction that involves a QIF security, such as the example attached.
4. Notice that a new GnuCash commodity was created during by the importer.
5. Restart GnuCash, again with --nofile.
6. Import the same QIF file.
7. Notice that no GnuCash commodity gets created by the importer.


Actual results:
The QIF importer does not create a commodity.

Expected results:
The QIF importer should create a commodity, and that commodity should be used for the GnuCash account that holds the shares.

Does this happen every time?
Yes.

Other information:
The problem occurs because the QIF importer assumes that any QIF security that has been imported in the past will already exist as a commodity in the GnuCash data file. This is not a valid assumption for users that switch between multiple GnuCash data files.
Comment 1 Charles Day 2008-01-21 13:03:00 UTC
Created attachment 103332 [details]
QIF file demonstrating the bug
Comment 2 Charles Day 2008-01-22 05:38:13 UTC
Created attachment 103401 [details] [review]
Proposed patch

With this patch, the importer verifies that each previously imported QIF security actually exists as a commodity in GnuCash, rather than assuming so.
Comment 3 William Hamblen 2008-01-22 16:44:29 UTC
I've tested this on my data and it did fix the problem where commodity accounts were not created when the commodity section of qif-accounts-map already had entries for the securities.
Comment 4 Josh Sled 2008-02-01 00:56:59 UTC
trunk@16909, awaiting backport for 2.2.4.  Thanks!
Comment 5 Andreas Köhler 2008-02-03 02:21:28 UTC
Applied to branches/2.2 as r16920 for GnuCash 2.2.4.
Thanks a lot!
Comment 6 John Ralls 2018-06-29 22:00:02 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=511006. Please update any external references or bookmarks.