Skip to content

Commit 14f19ff

Browse files
author
Richard Jones
committed
Added DEFAULT_TIMEZONE. Fixed up some missing info from What's New.
1 parent e80f5f2 commit 14f19ff

File tree

8 files changed

+81
-22
lines changed

8 files changed

+81
-22
lines changed

CHANGES.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ Feature:
1111
by mailgw and may be used to veto creation of file attachments or
1212
messages. (sf bug 700265)
1313
- queries on a per-user basis, and public queries (sf "bug" 891798 :)
14+
- added DEFAULT_TIMEZONE (sf rfe 895139)
1415

1516
Fixed:
1617
- Boolean HTML templating was broken

doc/customizing.txt

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Customising Roundup
33
===================
44

5-
:Version: $Revision: 1.125 $
5+
:Version: $Revision: 1.126 $
66

77
.. This document borrows from the ZopeBook section on ZPT. The original is at:
88
http://www.zope.org/Documentation/Books/ZopeBook/current/ZPT.stx
@@ -203,6 +203,11 @@ The configuration variables available are:
203203
that, so you might need to specify a more limited character set (eg.
204204
'iso-8859-1'.
205205

206+
**DEFAULT_TIMEZONE** - ``0``
207+
Numeric hour timezone offest to be used when displaying local times.
208+
The default timezone is used when users do not choose their own in
209+
their settings.
210+
206211
The default config.py is given below - as you
207212
can see, the MAIL_DOMAIN must be edited before any interaction with the
208213
tracker is attempted.::
@@ -290,6 +295,10 @@ tracker is attempted.::
290295
EMAIL_CHARSET = 'utf-8'
291296
#EMAIL_CHARSET = 'iso-8859-1' # use this instead for Eudora users
292297

298+
# You may specify a different default timezone, for use when users do not
299+
# choose their own in their settings.
300+
DEFAULT_TIMEZONE = 0 # specify as numeric hour offest
301+
293302
#
294303
# SECURITY DEFINITIONS
295304
#

doc/index.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ Dan Grassi,
8585
Engelbert Gruber,
8686
Juergen Hermann,
8787
Tobias Hunger,
88+
Christophe Kalt,
8889
Brian Kelley,
8990
James Kew,
9091
Sheila King,

doc/whatsnew-0.7.txt

Lines changed: 48 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,15 @@ highly recommended, as the effort is minimal.
110110
4. You might also wish to remove the redundant query editing section from the
111111
``user.item.html`` page.
112112

113+
ZRoundup reinstated
114+
-------------------
115+
116+
The Zope interface, ZRoundup, lives again!
117+
118+
See the `upgrading documentation`__ if you wish to use it.
119+
120+
__ upgrading.html#zroundup-changes
121+
113122

114123
Simple support for collision detection
115124
--------------------------------------
@@ -185,6 +194,11 @@ have permission to view the information.
185194
This removes the need for the template to perform those checks, which was
186195
just plain messy.
187196

197+
Some new permissions will need to be created in your trackers to cope with
198+
this change, as outlined in the `upgrading documentation`__.
199+
200+
__ upgrading.html#permission-assignments
201+
188202

189203
Standards changes
190204
-----------------
@@ -270,20 +284,26 @@ Postgresql is a good choice if you expect your tracker to grow very large,
270284
and are expecting many users.
271285

272286

273-
Other improvements
274-
------------------
287+
API change
288+
----------
289+
290+
The Database.curuserid attribute was removed. Any code referencing this
291+
attribute should be replaced with a call to Database.getuid().
275292

276-
All RDBMS backends now have indexes automatically created on critical
277-
table columns.
278293

279-
Additionally, the RDBMS backends also implement their own session,
280-
one-time-key and full-text indexing stores. These were previously external
281-
dbm stores. This change allows control of locking the database to be
282-
completely handed over to the RDBMS.
294+
New configuration options
295+
-------------------------
283296

284-
Date values capture fractions of seconds now. Note that the MySQL backend
285-
is not capable of storing this precision though, so it will be lost for
286-
users of that backend.
297+
- Added DEFAULT_TIMEZONE which allows the tracker to have a different
298+
default to UTC when users don't specify their own preference.
299+
300+
- Added EMAIL_CHARSET (in 0.6.6, but worth mentioning here) which hard-codes
301+
the character set to be used when sending email from Roundup. This works
302+
around some email clients' inability to cope well with UTF-8 (the
303+
default).
304+
305+
- ERROR_MESSAGES_TO and DISPATCHER_EMAIL as described above in `Dispatcher
306+
configuration`_.
287307

288308

289309
Typed columns in RDBMS backends
@@ -380,4 +400,21 @@ to another. Example usage::
380400
which copies users 3, 4, 5, 6, 7, 8, 9, 10, 14 and 16.
381401

382402

403+
Other improvements
404+
------------------
405+
406+
- All RDBMS backends now have indexes automatically created on critical
407+
table columns.
408+
409+
- Additionally, the RDBMS backends also implement their own session,
410+
one-time-key and full-text indexing stores. These were previously external
411+
dbm stores. This change allows control of locking the database to be
412+
completely handed over to the RDBMS.
413+
414+
- Date values capture fractions of seconds now. Note that the MySQL backend
415+
is not capable of storing this precision though, so it will be lost for
416+
users of that backend.
417+
418+
419+
383420
.. _`customisation documentation`: customizing.html

roundup/cgi/templating.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1262,7 +1262,7 @@ def field(self, size = 30):
12621262
tz = self._db.getUserTimezone()
12631263
value = cgi.escape(str(self._value.local(tz)))
12641264

1265-
if is_edit_ok():
1265+
if self.is_edit_ok():
12661266
value = '"'.join(value.split('"'))
12671267
return self.input(name=self._formname,value=value,size=size)
12681268

roundup/roundupdb.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
1616
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
1717
#
18-
# $Id: roundupdb.py,v 1.103 2004-03-22 00:15:34 richard Exp $
18+
# $Id: roundupdb.py,v 1.104 2004-03-26 23:45:34 richard Exp $
1919

2020
"""Extending hyperdb with types specific to issue-tracking.
2121
"""
@@ -56,7 +56,7 @@ def getUserTimezone(self):
5656
# If there is no class 'user' or current user doesn't have timezone
5757
# property or that property is not numeric assume he/she lives in
5858
# Greenwich :)
59-
timezone = 0
59+
timezone = self.config.get('DEFAULT_TIMEZONE', 0)
6060
return timezone
6161

6262
def confirm_registration(self, otk):

templates/classic/config.py

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
1616
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
1717
#
18-
# $Id: config.py,v 1.7 2004-03-25 22:38:55 eparker Exp $
18+
# $Id: config.py,v 1.8 2004-03-26 23:45:34 richard Exp $
1919

2020
import os
2121

@@ -63,7 +63,8 @@
6363
# The email address that roundup will complain to if it runs into trouble
6464
ADMIN_EMAIL = 'roundup-admin@%s'%MAIL_DOMAIN
6565

66-
# The 'dispatcher' is a role that can get notified of new items to the database.
66+
# The 'dispatcher' is a role that can get notified of new items to the
67+
# database. It is used by the ERROR_MESSAGES_TO config setting.
6768
DISPATCHER_EMAIL = ADMIN_EMAIL
6869

6970
# Additional text to include in the "name" part of the From: address used
@@ -81,10 +82,12 @@
8182
NEW_WEB_USER_ROLES = 'User'
8283
NEW_EMAIL_USER_ROLES = 'User'
8384

84-
# Send error messages to the dispatcher, user, or both?
85-
# If 'dispatcher', error message notifications will only be sent to the dispatcher.
86-
# If 'user', error message notifications will only be sent to the user.
87-
# If 'both', error message notifications will be sent to both individuals.
85+
# Send error message emails to the dispatcher, user, or both?
86+
# If 'dispatcher', error messages will only be sent to the dispatcher.
87+
# If 'user', error messages will only be sent to the user.
88+
# If 'both', error messages will be sent to both individuals.
89+
# The dispatcher is configured using the DISPATCHER_EMAIL setting, which
90+
# defaults to ADMIN_EMAIL.
8891
ERROR_MESSAGES_TO = 'user'
8992

9093
# Send nosy messages to the author of the message
@@ -131,4 +134,8 @@
131134
EMAIL_CHARSET = 'utf-8'
132135
#EMAIL_CHARSET = 'iso-8859-1' # use this instead for Eudora users
133136

137+
# You may specify a different default timezone, for use when users do not
138+
# choose their own in their settings.
139+
DEFAULT_TIMEZONE = 0 # specify as numeric hour offest
140+
134141
# vim: set filetype=python ts=4 sw=4 et si

templates/minimal/config.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
1616
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
1717
#
18-
# $Id: config.py,v 1.5 2004-03-25 19:27:15 eparker Exp $
18+
# $Id: config.py,v 1.6 2004-03-26 23:45:34 richard Exp $
1919

2020
import os
2121

@@ -131,4 +131,8 @@
131131
EMAIL_CHARSET = 'utf-8'
132132
#EMAIL_CHARSET = 'iso-8859-1' # use this instead for Eudora users
133133

134+
# You may specify a different default timezone, for use when users do not
135+
# choose their own in their settings.
136+
DEFAULT_TIMEZONE = 0 # specify as numeric hour offest
137+
134138
# vim: set filetype=python ts=4 sw=4 et si

0 commit comments

Comments
 (0)