Demo Discussion
Forum Config Examples Contributions Vulnerabilities
  Discussion forum about ELOG  Not logged in ELOG logo
icon3.gif   Display of draft entries in elog, posted by Stefan Ritt on Fri Dec 2 13:54:36 2016 
    icon2.gif   Re: Display of draft entries in elog, posted by Stefan Ritt on Fri Dec 2 14:54:58 2016 
Message ID: 68482     Entry time: Fri Dec 2 13:54:36 2016     Reply to this: 68483
Icon: Idea  Author: Stefan Ritt  Author Email: stefan.ritt@psi.ch 
Category: Info  OS: All  ELOG Version: 3.1.2-6ec506b 
Subject: Display of draft entries in elog 

Dear all,

there seems to be still lots of confusion with the new "draft modus" introduced in elog 3.1.2. Here is how it works:

If you edit an old or new entry, your changes are written to the elog server every few seconds. The entry in the elog database is marked as "draft". The idea behind that is that if your browser crashes or you navigate away from the elog page without saving your entry, the "draft" entry is sill in the elog database and can be recovered later. This is typically useful on some shift logbooks, where people keep the entry open for many hours and add things every few minutes. If they have a crash, they would loose a few hours of information.

The draft modus now has a few drawbacks:

  • If you have some draft entries in your elog database, you don't see them until you hit "New" the next time. Then the system offers you to continue the open draft entries.
  • Once you change an existing entry, you cannot go back to the version of that entry before you started to make modifications. The only option is to keep the current version or delete the whole entry. The old version of your entry in the database is overwritten every few seconds with the current contents of your edit text field.

To fix the first problem, I introduced a new flag "List drafts = 0|1". If this flag is 1, the draft entries are shown in the list view. The default value for this flag is 1, so normally you should see the draft entries in the database. You should refrain from editing these entries if you know that currently somebody else is working on them, otherwise you will overwrite each other's modifications. The modification is in the current git version of elog which is 3.1.2-6ec506b.

The scond drawback is harder to address. In order to go back to previous version, you would need a full version system (ala git), which is far beyond the scope of elog. I'm working on a partial fix by storing the contents on an entry inside the browser when you start editing an entry. You can then "cancel" your modifications by pasting back the original version from your browser. This works of course only if your browser does not crash or you do not navigate away from the elog page, in which case the original version will be lost.

If anybody has a strong opinion about these changes, please post them here.

Stefan

ELOG V3.1.5-3fb85fa6