moneyguru icon indicating copy to clipboard operation
moneyguru copied to clipboard

Unassigned filter and partially assigned split transactions

Open tuxlifan opened this issue 7 years ago • 0 comments

re the "unassigned" issue from #490:

Consider the attached import.qif (to import into Example Document), when importing select the "Checking" account as target.

I was looking for a way to fill in the blanks for the imported transaction ("IT") from the Checking account transaction list since that is the place I know where the transaction must show up and be easy enough to identify as "the latest imported things I want to work on and have the paperwork for right in front of me". Once I select the Unassigned filter there, the IT disappears. However, in the "Transactions" list (Ctrl+3), with Unassigned filter, the IT does show up.

The manual just states:

The Account view also has a filter bar, which behaves similarly to the one in the Transactions view, but with slight differences. [...] Unassigned: Show only unassigned entries.

Since the split transaction actually is assigned in respect to the account the behavior is explicable.

I think the main issue was my mental model not matching moneyguru's(?) and finding e.g. "Reconciled" intuitively scoped to the account but "Unassigned" as a global state of a transaction.

OTOH, now that I have actually looked at the code, maybe it actually is a bug:

in core/gui/transaction_view.py +85

        if filter_type is FilterType.Unassigned:
            txns = [t for t in txns if t.has_unassigned_split]

and core/model/transaction.py +462

    def has_unassigned_split(self):
        """*readonly*. ``bool``. Whether any of our splits is unassigned (None)."""
        return any(s.account is None for s in self.splits)

I cannot see how that should lead to anything scoped, except if the oven does some funky filtering on its own when we build the txns list at core/gui/transaction_view.py +76?

Not sure how to debug that, at least in a file saved after the import the transaction is (with added linebreaks):

<transaction date="2017-09-30" description="The main memo for this transaction (IBAN/BIC references, bill ids, etc.)" mtime="1507545470" payee="Some Payee">
<split account="Checking" amount="USD -8.22" />
<split account="" amount="USD 8.00" memo="The category/account for this split is unknown at prep time" />
<split account="Interest Paid" amount="USD 0.22" memo="Memo for the interest split" />
</transaction>

so so the second account was probably None?

import.qif.txt

tuxlifan avatar Oct 09 '17 10:10 tuxlifan