[Inquiry]GNUCash SoC - Implementing Undo
Derek Atkins
warlord at MIT.EDU
Wed Mar 28 05:37:47 EDT 2007
Ariel <asgnucash at dsgml.com> writes:
> Each time something is written to the log, it's also written to undo - in
> fact a large part of undo is already written: the log already records a
> before and after, all you need to do is put in a gui to see each entry in
> the log and you are all set.
>
> There was debate earlier on where to 'attach' the undo, to the register
> view, to an account, etc - I say just use the transaction log, you know it
> works and it's already written.
Except the transaction log ONLY tracks transactions. It does NOT track:
- Accounts (create/modify/delete)
- PriceDB (create/modify/delete)
- SXes ...
- Budgets ...
- Business Features [Customers/Vendors/Employees/Invoices/...]
- etc.
So saying "just use the transaction log" is really limiting yourself,
or perhaps ignoring a major part of the problem.
I DO understand the want for locality of operation. At some level it
DOES make sense to have "register"-based undo context (note that I'm
saying "register", not "account" -- I think the General Ledger
register, or even a Search Result register should have an undo
locality, but those registers do NOT have an associated Account).
But I ALSO think that there needs to be an application-wide UNDO
list, for operations that don't have a locality.. E.g. imports,
accounts/budget/business object creation, etc.
This is clearly a VERY big problem, but how can we scope it to make it
doable in a summer. Perhaps each QOF Instance has an undo log and
there's some way to merge all those logs into some serialized list
based on the current context? But of course you still have to worry
about the atomicity. For example, an import operation will create (or
modify -- setting the cleared status) a bunch of accounts and
transactions at one time, so if you're in an account register of one
of those transactions you shouldn't be able to remove that WHOLE
transaction without removing the whole import -- and gnucash should
warn you about that somehow.
-derek
--
Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
Member, MIT Student Information Processing Board (SIPB)
URL: http://web.mit.edu/warlord/ PP-ASEL-IA N1NWH
warlord at MIT.EDU PGP key available
More information about the gnucash-devel
mailing list