From: richard Date: Fri, 26 Mar 2004 23:45:34 +0000 (+0000) Subject: Added DEFAULT_TIMEZONE. X-Git-Url: https://git.tokkee.org/?p=roundup.git;a=commitdiff_plain;h=bdd72f4fe3f6d2e021748b95ac4c848269ee4367 Added DEFAULT_TIMEZONE. Fixed up some missing info from What's New. git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@2217 57a73879-2fb5-44c3-a270-3262357dd7e2 --- diff --git a/CHANGES.txt b/CHANGES.txt index d7b3d19..3287abb 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -11,6 +11,7 @@ Feature: by mailgw and may be used to veto creation of file attachments or messages. (sf bug 700265) - queries on a per-user basis, and public queries (sf "bug" 891798 :) +- added DEFAULT_TIMEZONE (sf rfe 895139) Fixed: - Boolean HTML templating was broken diff --git a/doc/customizing.txt b/doc/customizing.txt index f5223dd..3e56a82 100644 --- a/doc/customizing.txt +++ b/doc/customizing.txt @@ -2,7 +2,7 @@ Customising Roundup =================== -:Version: $Revision: 1.125 $ +:Version: $Revision: 1.126 $ .. This document borrows from the ZopeBook section on ZPT. The original is at: http://www.zope.org/Documentation/Books/ZopeBook/current/ZPT.stx @@ -203,6 +203,11 @@ The configuration variables available are: that, so you might need to specify a more limited character set (eg. 'iso-8859-1'. +**DEFAULT_TIMEZONE** - ``0`` + Numeric hour timezone offest to be used when displaying local times. + The default timezone is used when users do not choose their own in + their settings. + The default config.py is given below - as you can see, the MAIL_DOMAIN must be edited before any interaction with the tracker is attempted.:: @@ -290,6 +295,10 @@ tracker is attempted.:: EMAIL_CHARSET = 'utf-8' #EMAIL_CHARSET = 'iso-8859-1' # use this instead for Eudora users + # You may specify a different default timezone, for use when users do not + # choose their own in their settings. + DEFAULT_TIMEZONE = 0 # specify as numeric hour offest + # # SECURITY DEFINITIONS # diff --git a/doc/index.txt b/doc/index.txt index 462a855..1c8be02 100644 --- a/doc/index.txt +++ b/doc/index.txt @@ -85,6 +85,7 @@ Dan Grassi, Engelbert Gruber, Juergen Hermann, Tobias Hunger, +Christophe Kalt, Brian Kelley, James Kew, Sheila King, diff --git a/doc/whatsnew-0.7.txt b/doc/whatsnew-0.7.txt index 5bbb8f3..db409db 100644 --- a/doc/whatsnew-0.7.txt +++ b/doc/whatsnew-0.7.txt @@ -110,6 +110,15 @@ highly recommended, as the effort is minimal. 4. You might also wish to remove the redundant query editing section from the ``user.item.html`` page. +ZRoundup reinstated +------------------- + +The Zope interface, ZRoundup, lives again! + +See the `upgrading documentation`__ if you wish to use it. + +__ upgrading.html#zroundup-changes + Simple support for collision detection -------------------------------------- @@ -185,6 +194,11 @@ have permission to view the information. This removes the need for the template to perform those checks, which was just plain messy. +Some new permissions will need to be created in your trackers to cope with +this change, as outlined in the `upgrading documentation`__. + +__ upgrading.html#permission-assignments + Standards changes ----------------- @@ -270,20 +284,26 @@ Postgresql is a good choice if you expect your tracker to grow very large, and are expecting many users. -Other improvements ------------------- +API change +---------- + +The Database.curuserid attribute was removed. Any code referencing this +attribute should be replaced with a call to Database.getuid(). -All RDBMS backends now have indexes automatically created on critical -table columns. -Additionally, the RDBMS backends also implement their own session, -one-time-key and full-text indexing stores. These were previously external -dbm stores. This change allows control of locking the database to be -completely handed over to the RDBMS. +New configuration options +------------------------- -Date values capture fractions of seconds now. Note that the MySQL backend -is not capable of storing this precision though, so it will be lost for -users of that backend. +- Added DEFAULT_TIMEZONE which allows the tracker to have a different + default to UTC when users don't specify their own preference. + +- Added EMAIL_CHARSET (in 0.6.6, but worth mentioning here) which hard-codes + the character set to be used when sending email from Roundup. This works + around some email clients' inability to cope well with UTF-8 (the + default). + +- ERROR_MESSAGES_TO and DISPATCHER_EMAIL as described above in `Dispatcher + configuration`_. Typed columns in RDBMS backends @@ -380,4 +400,21 @@ to another. Example usage:: which copies users 3, 4, 5, 6, 7, 8, 9, 10, 14 and 16. +Other improvements +------------------ + +- All RDBMS backends now have indexes automatically created on critical + table columns. + +- Additionally, the RDBMS backends also implement their own session, + one-time-key and full-text indexing stores. These were previously external + dbm stores. This change allows control of locking the database to be + completely handed over to the RDBMS. + +- Date values capture fractions of seconds now. Note that the MySQL backend + is not capable of storing this precision though, so it will be lost for + users of that backend. + + + .. _`customisation documentation`: customizing.html diff --git a/roundup/cgi/templating.py b/roundup/cgi/templating.py index da9d29e..e89ac27 100644 --- a/roundup/cgi/templating.py +++ b/roundup/cgi/templating.py @@ -1262,7 +1262,7 @@ class DateHTMLProperty(HTMLProperty): tz = self._db.getUserTimezone() value = cgi.escape(str(self._value.local(tz))) - if is_edit_ok(): + if self.is_edit_ok(): value = '"'.join(value.split('"')) return self.input(name=self._formname,value=value,size=size) diff --git a/roundup/roundupdb.py b/roundup/roundupdb.py index 0083806..98310fc 100644 --- a/roundup/roundupdb.py +++ b/roundup/roundupdb.py @@ -15,7 +15,7 @@ # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. # -# $Id: roundupdb.py,v 1.103 2004-03-22 00:15:34 richard Exp $ +# $Id: roundupdb.py,v 1.104 2004-03-26 23:45:34 richard Exp $ """Extending hyperdb with types specific to issue-tracking. """ @@ -56,7 +56,7 @@ class Database: # If there is no class 'user' or current user doesn't have timezone # property or that property is not numeric assume he/she lives in # Greenwich :) - timezone = 0 + timezone = self.config.get('DEFAULT_TIMEZONE', 0) return timezone def confirm_registration(self, otk): diff --git a/templates/classic/config.py b/templates/classic/config.py index d57df1a..2712b94 100644 --- a/templates/classic/config.py +++ b/templates/classic/config.py @@ -15,7 +15,7 @@ # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. # -# $Id: config.py,v 1.7 2004-03-25 22:38:55 eparker Exp $ +# $Id: config.py,v 1.8 2004-03-26 23:45:34 richard Exp $ import os @@ -63,7 +63,8 @@ TRACKER_WEB = 'http://tracker.example/cgi-bin/roundup.cgi/bugs/' # The email address that roundup will complain to if it runs into trouble ADMIN_EMAIL = 'roundup-admin@%s'%MAIL_DOMAIN -# The 'dispatcher' is a role that can get notified of new items to the database. +# The 'dispatcher' is a role that can get notified of new items to the +# database. It is used by the ERROR_MESSAGES_TO config setting. DISPATCHER_EMAIL = ADMIN_EMAIL # Additional text to include in the "name" part of the From: address used @@ -81,10 +82,12 @@ EMAIL_FROM_TAG = "" NEW_WEB_USER_ROLES = 'User' NEW_EMAIL_USER_ROLES = 'User' -# Send error messages to the dispatcher, user, or both? -# If 'dispatcher', error message notifications will only be sent to the dispatcher. -# If 'user', error message notifications will only be sent to the user. -# If 'both', error message notifications will be sent to both individuals. +# Send error message emails to the dispatcher, user, or both? +# If 'dispatcher', error messages will only be sent to the dispatcher. +# If 'user', error messages will only be sent to the user. +# If 'both', error messages will be sent to both individuals. +# The dispatcher is configured using the DISPATCHER_EMAIL setting, which +# defaults to ADMIN_EMAIL. ERROR_MESSAGES_TO = 'user' # Send nosy messages to the author of the message @@ -131,4 +134,8 @@ HTML_VERSION = 'html4' # either 'html4' or 'xhtml' EMAIL_CHARSET = 'utf-8' #EMAIL_CHARSET = 'iso-8859-1' # use this instead for Eudora users +# You may specify a different default timezone, for use when users do not +# choose their own in their settings. +DEFAULT_TIMEZONE = 0 # specify as numeric hour offest + # vim: set filetype=python ts=4 sw=4 et si diff --git a/templates/minimal/config.py b/templates/minimal/config.py index 7b2807e..2a5799c 100644 --- a/templates/minimal/config.py +++ b/templates/minimal/config.py @@ -15,7 +15,7 @@ # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. # -# $Id: config.py,v 1.5 2004-03-25 19:27:15 eparker Exp $ +# $Id: config.py,v 1.6 2004-03-26 23:45:34 richard Exp $ import os @@ -131,4 +131,8 @@ HTML_VERSION = 'html4' # either 'html4' or 'xhtml' EMAIL_CHARSET = 'utf-8' #EMAIL_CHARSET = 'iso-8859-1' # use this instead for Eudora users +# You may specify a different default timezone, for use when users do not +# choose their own in their settings. +DEFAULT_TIMEZONE = 0 # specify as numeric hour offest + # vim: set filetype=python ts=4 sw=4 et si