[GNC-dev] Online ID matching for OFX import
mta at umich.edu
Sun Jan 5 14:20:39 EST 2020
Ok, how about changing it to try an exact match first and only try the
partial match if that fails. If that makes sense I'll fix it tonight. One
question I have is whether this will do the right thing if I add a new
security so the parent account exists but the security account doesn't. I
think it will since the accounts commodity will be wrong.
On Sun, Jan 5, 2020, 10:01 AM John Ralls <jralls at ceridwen.us> wrote:
> > 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.
> John Ralls
More information about the gnucash-devel