Undo Log formatting is hard to read
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.
Changed in zope2: | |
importance: | Low → Wishlist |
Changed in transaction: | |
status: | New → Fix Released |
Changed in zope2: | |
milestone: | 2.12.5 → 2.12.6 |
Changed in zope2: | |
status: | Fix Committed → Fix Released |
Uploaded: notes.diff
patch attached