Undo Log formatting is hard to read

Bug #142464 reported by Toby Dickenson
2
Affects Status Importance Assigned to Milestone
Zope 2
Fix Released
Wishlist
Tres Seaver
transaction
Fix Released
Undecided
Unassigned

Bug Description

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.

Revision history for this message
Toby Dickenson (htrd) wrote :

Uploaded: notes.diff

patch attached

Revision history for this message
Toby Dickenson (htrd) wrote :

Status: Accepted => Pending

 Supporters removed: htrd

Unassigning myself.... Im going to have to leave this for someone else.

Revision history for this message
Toby Dickenson (htrd) wrote :

Unassigning myself.... Im going to have to leave this for someone else.

Changed in zope2:
importance: Low → Wishlist
Revision history for this message
Tres Seaver (tseaver) wrote :

The Zope2 size of this patch is now committed to the trunk:

 http://svn.zope.org/Zope/trunk/?rev=112137&view=rev

Changed in zope2:
assignee: nobody → Tres Seaver (tseaver)
milestone: none → 2.12.5
status: New → Fix Committed
Revision history for this message
Tres Seaver (tseaver) wrote :

I applied the ZODB/Transaction.py part of the patch to the transaction package, and released it as transaction 1.0.1:

  http://pypi.python.org/pypi/transaction/1.0.1

Tres Seaver (tseaver)
Changed in transaction:
status: New → Fix Released
Changed in zope2:
milestone: 2.12.5 → 2.12.6
Tres Seaver (tseaver)
Changed in zope2:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.