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 764268 - [PATCH] MT940 import select account based on transaction info
[PATCH] MT940 import select account based on transaction info
Status: RESOLVED FIXED
Product: GnuCash
Classification: Other
Component: Import - AqBanking
git-master
Other All
: Normal normal
: ---
Assigned To: gnucash-import-maint
gnucash-import-maint
Depends on:
Blocks:
 
 
Reported: 2016-03-28 00:26 UTC by Jethro Beekman
Modified: 2018-06-29 23:48 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gnc-ab-utils.c.patch (2.47 KB, patch)
2016-03-28 00:26 UTC, Jethro Beekman
none Details | Review
gnc-ab-utils.c.patch (2.51 KB, patch)
2016-03-30 00:26 UTC, Jethro Beekman
none Details | Review
gnc-ab-utils.c.patch (2.51 KB, patch)
2016-03-30 00:28 UTC, Jethro Beekman
accepted-commit_now Details | Review

Description Jethro Beekman 2016-03-28 00:26:57 UTC
Created attachment 324855 [details] [review]
gnc-ab-utils.c.patch

When importing MT940 files, AqBanking will (sometimes?) put all transactions under a single AccountInfo, even when there are multiple accounts in the file. Luckily the correct account information can be recovered from the transaction information. This patch will try to use the account information in the transaction before trying to use the saved account state.
Comment 1 Christian Stimming 2016-03-29 19:07:29 UTC
Review of attachment 324855 [details] [review]:

The code is a good suggestion. There are minor quirks, though: Please keep the "const Account*" constness or otherwise the compiler will complain. Also, for c98 adding this declaration in the middle of the code is still not allowed - please add a declaration before the statements. With this, the patch may very well be applied both in maint and master. Thanks!
Comment 2 Jethro Beekman 2016-03-30 00:26:49 UTC
Created attachment 324980 [details] [review]
gnc-ab-utils.c.patch

Updated according to 324855 review
Comment 3 Jethro Beekman 2016-03-30 00:27:39 UTC
I assume you meant "const AB_TRANSACTION*" which I fixed. I don't see any "const Account*", could you please be specific if that's still an issue?
Comment 4 Jethro Beekman 2016-03-30 00:28:56 UTC
Created attachment 324981 [details] [review]
gnc-ab-utils.c.patch
Comment 5 Christian Stimming 2016-04-05 19:50:19 UTC
Review of attachment 324981 [details] [review]:

ok, ready for trunk
Comment 6 Christian Stimming 2016-04-05 19:55:34 UTC
dc4fce0
Comment 7 John Ralls 2018-06-29 23:48:16 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=764268. Please update any external references or bookmarks.