[ZCM] [ZC] 807/ 1 Request "Undo Log formatting is hard to read"

Collector: Zope Bugs, Features, and Patches ... zope-coders-admin@zope.org
Thu, 13 Feb 2003 10:11:22 -0500


Issue #807 Update (Request) "Undo Log formatting is hard to read"
 Status Accepted, Zope/feature+solution low
To followup, visit:
  http://collector.zope.org/Zope/807

==============================================================
= Request - Entry #1 by htrd on Feb 13, 2003 10:11 am

 Status: Pending => Accepted

 Supporters added: htrd

This patch address several issues in ZODB and Zope.

1. The Transaction.note method can be used to attach a comment to a transaction. Currently multiple notes are joined with \n\n. Is there a good reason for having two of them? This patch changes it to a single \n, because it makes it easier to create a nice presentation in the Zope management interface.

2. The 'history' and 'undo' management interfaces show the transaction note. Usually it just contains the url. This patch adds newline_to_br to the dhml tag so that individual notes are shown on seperate lines.

The only way to get multiple notes for one transaction in standard zope, as far as I am aware, is using Undo. You get one note for the URL of the undo method, then one note per transaction that has been undone. This patch puts each of these on a seperate line.

3. The undo operation creates these extra notes based on the timestamp, url, and notes of the transaction being undone. Currently they are all joined together with all whitespace stripped. Yes, really! The space between time and date, any spaces in the url, and all whitespace in the old comment are removed. This patch leaves whitespace intact.

Some outstanding questions that need a second opinion before commiting this:

a. Does anything rely on the fact that multiple notes are joined with \n\n. I dont think so.

b. Does anything rely on the absence of whitespace in the notes of undone transactions. I dont think so.

There are other inconsistencies in the presentation of this information in the 'undo' and 'history' user interfaces. I will leave that for another patch.

==============================================================