[Inquiry]GNUCash SoC - Implementing Undo
akintayo holder
blakdogg at gmail.com
Fri Mar 23 01:44:24 EDT 2007
Hi,
Its seems that with respect to multi-user transactions and Undo, the first
step would be to enforce this rule; A transaction cannot be Undone if the
state of the record does not match the state after the original transaction
had completed. For example, you can only Undo an account creation if the
account was still empty.
I would implement the update history as an account associated data structure
which is stored in memory. A local history would allow undos to be performed
by simply traversing the account's list and picking the next change. Anyway,
this approach would mean that updates from other users are not aggregated in
one list.
Thanks for the comments.
Akintayo
On 3/21/07, Derek Atkins <warlord at mit.edu> wrote:
>
> Ariel <asgnucash at dsgml.com> writes:
>
> > It seems to me that an undo in a multi-user environment should be
> exactly
> > equal to the user deleting (or changing, etc) the transaction manually
> > back to what it was.
>
> As pointed out, this isn't completely true. In a multi-user environment
> another user may have updated the transaction so your "undo" shouldn't
> silently discard their changes.
> Meaning the log file would first show a 'do' transaction and later would
> > show an 'undo' transaction, rather then the transaction not showing up
> in
> > the log at all.
>
> This is true..
>
> > It's not exactly how undo on an editor works, but I think it's the right
> > thing for gnucash. One consequence is that if you do something and then
> > undo it, gnucash will ask you to save the file, while in an editor it
> > wouldn't.
>
> Well, in a multi-user environment you're certainly using a DB, so there
> would be no "save". Each Do/Undo would effect a save to the DB.
>
> > -Ariel
>
> -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