comparison doc/design.txt @ 5112:8901cc4ef0e0

- issue1714899: Feature Request: Optional Change Note. Added a new quiet=True/False option for all property types. When quiet=True changes to the property will not be displayed in the:: confirmation banner (shown in green) when a change is made property change section of change note (nosy emails) web history display for an item. Note that this may confuse users if used on a property that is meant to be changed by a user. It is most useful on administrative properties that are changed by an auditor as part of a user generated change. Original patch by Daniel Diniz (ajaksu2) discussed also at: http://psf.upfronthosting.co.za/roundup/meta/issue249 Support for setting quiet when calling the class specifiers: E.G. prop=String(quiet=True) rather than:: prop=String() prop.quiet=True support for anydb backend, added tests, doc updates, support for ignoring quiet setting using showall=True in call to history() function in templates by John Rouillard. In addition to documenting quiet, I also documented required and default_value additions to the hyperdb property classes. Only place I could find is design.txt. Note tests for history in web interface are not done. It was manually checked but there are no automated tests. The template for setup is in db_test_base.py::testQuietJournal but it has no asserts. I need access to template.py::_HTMLItem::history() and I don't know how to do that. test_templates.py isn't helping me any at all and I want to get this patch in because it handles nicely an issue I have in the design of my own tracker. The issue is: The properties of an issue are displayed in framesets/subframes. The user can roll up the frameset leaving only the title bar. When the user saves the changes, the current state of the framesets (collapsed/uncollapsed) is saved to a property in the user's object. However there is no reason the user should see that this is updated since it's an administrative detail. Similarly, you could count the number of times an issue is reopened or reassigned. Updates to properties that are an indirect result of a user's change should not be displayed to the user as they can be confusing and distracting.
author John Rouillard <rouilj@ieee.org>
date Thu, 30 Jun 2016 20:38:23 -0400
parents e424987d294a
children 462b0f76fce8
comparison
equal deleted inserted replaced
5111:1c94afabb2cb 5112:8901cc4ef0e0
252 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 252 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
253 253
254 TODO: replace the Interface Specifications with links to the pydoc 254 TODO: replace the Interface Specifications with links to the pydoc
255 255
256 The hyperdb module provides property objects to designate the different 256 The hyperdb module provides property objects to designate the different
257 kinds of properties. These objects are used when specifying what 257 kinds of properties.
258 properties belong in classes:: 258
259 All property objects support the following settings:
260
261 quiet=False:
262 if set to True, changes to the property will not be shown to the
263 user. This can be used for adminstrative properties that are
264 automatically updated when a user makes some other change. This
265 reduces confusion by the user and clutter in the display.
266 The property change will not be shown in:
267
268 - the change confirmation message when a change is entered in the web interface
269 - the property change section of the change note email ("nosy email")
270 - the web history shown at the bottom of an item page
271
272 required=False:
273 if set to True, the property name is returned when calling
274 get_required_props(self, propnames = []). Any additional props
275 specified in propnames is merged with the required props.
276
277 default_value=None or [] depending on object type:
278 this sets the default value if none is specified. The default
279 value can be retrieved by calling the get_default_value()
280 method on the property object.
281
282 E.G. assuming title is part of an Issue::
283
284 title=String(required=True, default_value="not set",quiet=True)
285
286 will create a property called ``title`` that will be included in the
287 get_required_props() output. Calling
288 db.issue.properties['title'].get_default_value() will return "not set".
289 Changes to the property will not be displayed in emailed change notes,
290 the history at the end of the item pages in the web interface and will
291 be suppressed in the confirmation notice (displayed as a green banner)
292 shown on changes.
293
294 These objects are used when specifying what properties belong in classes::
259 295
260 class String: 296 class String:
261 def __init__(self, indexme='no'): 297 def __init__(self, indexme='no'):
262 """An object designating a String property.""" 298 """An object designating a String property."""
263 299
1650 1686
1651 1687
1652 Changes to this document 1688 Changes to this document
1653 ------------------------ 1689 ------------------------
1654 1690
1691 - Added docs for quiet, default_value and required arguments for properties.
1655 - Added Boolean, Integer and Number types 1692 - Added Boolean, Integer and Number types
1656 - Added section Hyperdatabase Implementations 1693 - Added section Hyperdatabase Implementations
1657 - "Item" has been renamed to "Issue" to account for the more specific 1694 - "Item" has been renamed to "Issue" to account for the more specific
1658 nature of the Class. 1695 nature of the Class.
1659 - New Templating 1696 - New Templating

Roundup Issue Tracker: http://roundup-tracker.org/