> We are using elog as a small database system, today we came across a
> problem where 2 people were editing the same record and the first one to
> submit his changes were overwritten when the second person submitted his.
>
> Is there anyway to lock a logbook record when someone has pressed EDIT,
> maybe set a flag in the logbook entry so it has to be unlocked when its
> submitted by the originator or by an administrator.
No, but I will put it on the wishlist. Anyhow it is hard to implement
something like this. Assume that I would lock a page whenever it's edited
by
someone. This person can edit it and forget to submit the changes, just
close
the browser. Since the elogd server does not know when a remote browser is
closed, it cannot determine if the editing is just taking long or if the
person closed the browser. In the latter case, the message would be locked
forever and nobody could change it any more. If I put a timeout, like keep
locked for N minutes, it's again not 100% safe. I saw people doing shift
work
with elog, opening a page, keeping it open for 8 hours and then submit it.
So
if I set the timeout to 8h, and someone abandons editing a message, this
message would be blocked for 8h, which is probably also not what you want.
Alternatively, I just can display a messge: Warning: this message is
currently edited by user xxx on host xxx. But if the warning is ignored by
the user, then again we have the same problem.
Do you see a clever solution to that? |