When importing an OFX file into an investment account, each transaction's account field is blank when the investment account as associated brokerage account are nested under another account.
Reproducible: Didn't try
Steps to Reproduce:
1.Create empty account used for grouping accounts (i.e Investment accounts)
2.Change hierarchy for both investment and associated brokerage accounts to be nested under new empty account
3.Import OFX file
Each transaction in the investment account that requires money to be drawn from the brokerage account will have a blank account field. Manual intervention is needed, otherwise the money will appear in both accounts, and will not be drawn down from the brokerage account
The associated brokerage account should be populated on transactions. This happens correctly when the accounts are not nested under another account.
Workaround is to not nest investment accounts
I believe that is has nothing to do with the brokerage account being nested. If I remember from dealing with a similar issue, KMM will only use the brokerage account automatically if it has exactly the default name, which is the name of the investment account followed by " (Brokerage)". Bug 329701 is a wishlist for exactly this issue.
Can you confirm if this is still the case? I know the brokerage account field does start out blank for imported investment transactions, but once you edit the transaction, they are usually filled in automatically.
Git commit fc3926479ed186ae2166e6701d267eb0b3f09a07 by Thomas Baumgart.
Committed on 09/05/2020 at 04:55.
Pushed by tbaumgart into branch '5.0'.
Detect brokerage account based on partial name
The detection of a brokerage account connected to an investment account
did not work if the brokerage account was not a top-level account
(sub-account of Asset or Liability).
This change allows to locate the brokerage account based on its name in
any hierarchical level of the account structure.
M +3 -0 kmymoney/converter/mymoneystatementreader.cpp