summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 975322e)
raw | patch | inline | side by side (parent: 975322e)
author | richard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Wed, 22 May 2002 04:12:05 +0000 (04:12 +0000) | ||
committer | richard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Wed, 22 May 2002 04:12:05 +0000 (04:12 +0000) |
... with significant additions and modifications ;)
- extended handling of ML assignedto to all places it's handled
- added more NotFound info
git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@749 57a73879-2fb5-44c3-a270-3262357dd7e2
- extended handling of ML assignedto to all places it's handled
- added more NotFound info
git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@749 57a73879-2fb5-44c3-a270-3262357dd7e2
CHANGES.txt | patch | blob | history | |
roundup/cgi_client.py | patch | blob | history | |
roundup/hyperdb.py | patch | blob | history | |
roundup/mailgw.py | patch | blob | history |
diff --git a/CHANGES.txt b/CHANGES.txt
index 093b56f29cacbdd1806f0daa655fcc35391cb3e7..5e3252cc662129b62a42d46369d999bea9cd465a 100644 (file)
--- a/CHANGES.txt
+++ b/CHANGES.txt
on messages that create issues and followup messages.
. reverting to dates for intervals > 2 months sucks
. changed the default message list in issues to display the message body
+ . applied patch #558876 ] cgi client customization
Fixed:
. stop sending blank (whitespace-only) notes
diff --git a/roundup/cgi_client.py b/roundup/cgi_client.py
index ec13b47ba13ba83563cce0adec79f92c7521cd57..9435c08fc0b9aad761523309926196f41722a836 100644 (file)
--- a/roundup/cgi_client.py
+++ b/roundup/cgi_client.py
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
#
-# $Id: cgi_client.py,v 1.121 2002-05-21 06:08:10 richard Exp $
+# $Id: cgi_client.py,v 1.122 2002-05-22 04:12:05 richard Exp $
__doc__ = """
WWW request handler (also used in the stand-alone server).
# skip if we need to fill in the logged-in user id there's
# no user logged in
if (spec['FILTERSPEC'].has_key('assignedto') and
- spec['FILTERSPEC']['assignedto'] is None and
- userid is None):
+ spec['FILTERSPEC']['assignedto'] in ('CURRENT USER',
+ None) and userid is None):
continue
links.append(self.make_index_link(name))
else:
def _add_assignedto_to_nosy(self, props):
''' add the assignedto value from the props to the nosy list
'''
- if not props.has_key('assignedto'):
+ # get the properties definition and make some checks
+ cl = self.db.classes[self.classname]
+ propdef = cl.getprops()
+ if not propdef.has_key('assignedto') or not propdef.has_key('nosy'):
+ return
+
+ # get the assignedto(s)
+ if isinstance(propdef['assignedto'], hyperdb.Link):
+ assignedto_ids = [props['assignedto']]
+ elif isinstance(propdef['assignedto'], hyperdb.Multilink):
+ assignedto_ids = props['assignedto']
+ else:
return
- assignedto_id = props['assignedto']
+
+ # ok, now get the nosy list value
if not props.has_key('nosy'):
# load current nosy
if self.nodeid:
- cl = self.db.classes[self.classname]
- l = cl.get(self.nodeid, 'nosy')
- if assignedto_id in l:
- return
- props['nosy'] = l
+ props['nosy'] = cl.get(self.nodeid, 'nosy')
else:
props['nosy'] = []
- if assignedto_id not in props['nosy']:
- props['nosy'].append(assignedto_id)
+
+ # and update for assignedto id(s)
+ for assignedto_id in assignedto_ids:
+ if assignedto_id not in props['nosy']:
+ props['nosy'].append(assignedto_id)
def _changenode(self, props):
''' change the node based on the contents of the form
try:
cl = self.db.classes[self.classname]
except KeyError:
- raise NotFound
+ raise NotFound, self.classname
try:
cl.get(self.nodeid, 'id')
except IndexError:
- raise NotFound
+ raise NotFound, self.nodeid
try:
func = getattr(self, 'show%s'%self.classname)
except AttributeError:
- raise NotFound
+ raise NotFound, 'show%s'%self.classname
func()
return
try:
func = getattr(self, 'new%s'%self.classname)
except AttributeError:
- raise NotFound
+ raise NotFound, 'new%s'%self.classname
func()
return
try:
self.db.getclass(self.classname)
except KeyError:
- raise NotFound
+ raise NotFound, self.classname
self.list()
#
# $Log: not supported by cvs2svn $
+# Revision 1.121 2002/05/21 06:08:10 richard
+# Handle migration
+#
# Revision 1.120 2002/05/21 06:05:53 richard
# . #551483 ] assignedto in Client.make_index_link
#
diff --git a/roundup/hyperdb.py b/roundup/hyperdb.py
index 5761e1d872ece31fda8fbd6bd86e3b6260e8a679..bf532d2a644673696df63a8ffbd64a7fd2c98f61 100644 (file)
--- a/roundup/hyperdb.py
+++ b/roundup/hyperdb.py
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
#
-# $Id: hyperdb.py,v 1.64 2002-05-15 06:21:21 richard Exp $
+# $Id: hyperdb.py,v 1.65 2002-05-22 04:12:05 richard Exp $
__doc__ = """
Hyperdatabase implementation, especially field types.
for entry in value:
# if it isn't a number, it's a key
if type(entry) != type(''):
- raise ValueError, 'link value must be String'
+ raise ValueError, 'new property "%s" link value ' \
+ 'must be a string'%key
if not num_re.match(entry):
try:
entry = self.db.classes[link_class].lookup(entry)
#
# $Log: not supported by cvs2svn $
+# Revision 1.64 2002/05/15 06:21:21 richard
+# . node caching now works, and gives a small boost in performance
+#
+# As a part of this, I cleaned up the DEBUG output and implemented TRACE
+# output (HYPERDBTRACE='file to trace to') with checkpoints at the start of
+# CGI requests. Run roundup with python -O to skip all the DEBUG/TRACE stuff
+# (using if __debug__ which is compiled out with -O)
+#
# Revision 1.63 2002/04/15 23:25:15 richard
# . node ids are now generated from a lockable store - no more race conditions
#
diff --git a/roundup/mailgw.py b/roundup/mailgw.py
index a114a5898d530eaa07767e2620a1584f771d9444..4c99afb0a22de18a65b7283dbb4032c2a92a10e6 100644 (file)
--- a/roundup/mailgw.py
+++ b/roundup/mailgw.py
an exception, the original message is bounced back to the sender with the
explanatory message given in the exception.
-$Id: mailgw.py,v 1.72 2002-05-22 01:24:51 richard Exp $
+$Id: mailgw.py,v 1.73 2002-05-22 04:12:05 richard Exp $
'''
current = {}
for nid in cl.get(nodeid, 'nosy'):
current[nid] = 1
- self.updateNosy(props, author, recipients, current)
+ self.updateNosy(cl, props, author, recipients, current)
# create the message
message_id = self.db.msg.create(author=author,
props['messages'] = [message_id]
# set up (clean) the nosy list
- self.updateNosy(props, author, recipients)
+ self.updateNosy(cl, props, author, recipients)
# and attempt to create the new node
try:
return nodeid
- def updateNosy(self, props, author, recipients, current=None):
+ def updateNosy(self, cl, props, author, recipients, current=None):
'''Determine what the nosy list should be given:
props: properties specified on the subject line of the message
if not current.has_key(recipient):
current[recipient] = 1
- # add assignedto to the nosy list
+ # add assignedto(s) to the nosy list
if props.has_key('assignedto'):
- assignedto = props['assignedto']
- if not current.has_key(assignedto):
- current[assignedto] = 1
+ propdef = cl.getprops()
+ if isinstance(propdef['assignedto'], hyperdb.Link):
+ assignedto_ids = [props['assignedto']]
+ elif isinstance(propdef['assignedto'], hyperdb.Multilink):
+ assignedto_ids = props['assignedto']
+ for assignedto_id in assignedto_ids:
+ if not current.has_key(assignedto_id):
+ current[assignedto_id] = 1
props['nosy'] = current.keys()
#
# $Log: not supported by cvs2svn $
+# Revision 1.72 2002/05/22 01:24:51 richard
+# Added note to MIGRATION about new config vars. Also made us more resilient
+# for upgraders. Reinstated list header style (oops)
+#
# Revision 1.71 2002/05/08 02:40:55 richard
# grr
#