You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A common scenario is to enter a transaction from a receipt with a merchant like "XYZ Holdings Pty Ltd"; only to later discover the commonly known trading name for that business (eg. "Bob's Pizza's").
When the transaction was created, we automatically create "XYZ Holdings Pty Ltd" as a payee (assuming we've never seen them before); and later when we edit the transaction's payee to "Bob's Pizza's", it creates another new payee.
The original payee ("XYZ Holdings") now has no transactions associated with it; so we no longer need to keep it in the database.
Effectively, we want to "ref count" payees/categories/securities; and when the ref count drops to zero (ie. not referenced by any transactions), delete it.
We could potentially do this on transaction save (note that if the transaction type changes, we delete & reinsert; so we would need to snapshot the original details before deleting, so that we can determine what to cleanup afterwards).
Or, like we do with scheduled transactions; we could run a process as part of the login that detects any orphaned entries and cleans them up (the downside there is that we slowdown login).
Or, we use this as an opportunity (perhaps as part of the Rails 5 upgrade...ie. ActiveJob) to look at introducing background processing
The text was updated successfully, but these errors were encountered:
Or, like we do with scheduled transactions; we could run a process as part of the login that detects any orphaned entries and cleans them up (the downside there is that we slowdown login).
Or we do it when the Payees/Categories List is displayed, with a toast or banner showing at the top of the page, e.g.
"There are 3 payees that have no no associated transactions. Would you like to remove them? Yes | No"
A common scenario is to enter a transaction from a receipt with a merchant like "XYZ Holdings Pty Ltd"; only to later discover the commonly known trading name for that business (eg. "Bob's Pizza's").
When the transaction was created, we automatically create "XYZ Holdings Pty Ltd" as a payee (assuming we've never seen them before); and later when we edit the transaction's payee to "Bob's Pizza's", it creates another new payee.
The original payee ("XYZ Holdings") now has no transactions associated with it; so we no longer need to keep it in the database.
Effectively, we want to "ref count" payees/categories/securities; and when the ref count drops to zero (ie. not referenced by any transactions), delete it.
We could potentially do this on transaction save (note that if the transaction type changes, we delete & reinsert; so we would need to snapshot the original details before deleting, so that we can determine what to cleanup afterwards).
Or, like we do with scheduled transactions; we could run a process as part of the login that detects any orphaned entries and cleans them up (the downside there is that we slowdown login).
Or, we use this as an opportunity (perhaps as part of the Rails 5 upgrade...ie. ActiveJob) to look at introducing background processing
The text was updated successfully, but these errors were encountered: