[GNC-dev] Online ID matching for OFX import
jralls at ceridwen.us
Sun Jan 5 09:51:51 EST 2020
> On Jan 5, 2020, at 12:40 AM, Mike Alexander <mta at umich.edu> wrote:
> When I tried to do my monthly import of an OFX file containing my TIAA/CREF transactions it failed miserably. I tracked it down to commit 7853f5a2 which changed the matching of online IDs for accounts to only match an initial substring of the required ID. My accounts are structured with a parent account in USD corresponding to a TIAA/CREF account and a sub-account under it for each asset in that account. The online ID for the parent account is something like "TIAA-CREF.ORG C8304GY8 RAM001 101011". The online ID for a sub-account storing an asset is created by appending the asset ID to the parent accounts online ID giving something like "TIAA-CREF.ORG C8304GY8 RAM001 101011878094101". gnc_import_select_account does a linear search of all accounts in no particular order looking for one where the online ID matches in initial substring of the ID it wants. If it finds the parent account before the sub account it returns that and the process fails since it's the wrong currency. I don't understand enough about the problem that commit is fixing to know how to fix it without breaking things.
The problem the commit was trying to fix is that AQB 5.99 for FinTS uses a raw SWIFT account code that for many German banks includes extra characters--often a currency code--on the end. Some banks also pad the code with leading zeros and a subsequent commit attempts to resolve that. This is https://bugs.gnucash.org/show_bug.cgi?id=797432.
More information about the gnucash-devel