summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 6073054)
raw | patch | inline | side by side (parent: 6073054)
author | richard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Mon, 14 Jan 2002 22:21:38 +0000 (22:21 +0000) | ||
committer | richard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Mon, 14 Jan 2002 22:21:38 +0000 (22:21 +0000) |
git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@546 57a73879-2fb5-44c3-a270-3262357dd7e2
diff --git a/CHANGES.txt b/CHANGES.txt
index e4b438d7d840c8e0755892e368e518522fa12648..69224c398bc7a468237a05ebb2b9a9e6f78f1178 100644 (file)
--- a/CHANGES.txt
+++ b/CHANGES.txt
. plain rendering of links in the htmltemplate now generate a hyperlink to
the linked node's page.
. #503330 ] ANONYMOUS_REGISTER now applies to mail
+ . #503353 ] setting properties in initial email
2002-01-08 - 0.4.0b1
diff --git a/roundup/roundupdb.py b/roundup/roundupdb.py
index 851b571043e38e0fde5535758fe1e808275a89fc..0238be6ae7016c0af728edd07a83e5918cb460af 100644 (file)
--- a/roundup/roundupdb.py
+++ b/roundup/roundupdb.py
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
#
-# $Id: roundupdb.py,v 1.39 2002-01-14 02:20:15 richard Exp $
+# $Id: roundupdb.py,v 1.40 2002-01-14 22:21:38 richard Exp $
__doc__ = """
Extending hyperdb with types specific to issue-tracking.
line = '_' * max(len(web), len(email))
return '%s\n%s\n%s\n%s'%(line, email, web, line)
+ def generateCreateNote(self, nodeid):
+ """Generate a create note that lists initial property values
+ """
+ cn = self.classname
+ cl = self.db.classes[cn]
+ props = cl.getprops(protected=0)
+
+ # list the values
+ m = []
+ for propname, prop in props.items():
+ value = cl.get(nodeid, propname, None)
+ if isinstance(prop, hyperdb.Link):
+ link = self.db.classes[prop.classname]
+ if value:
+ key = link.labelprop(default_to_id=1)
+ if key:
+ value = link.get(value, key)
+ else:
+ value = ''
+ elif isinstance(prop, hyperdb.Multilink):
+ if value is None: value = []
+ l = []
+ link = self.db.classes[prop.classname]
+ key = link.labelprop(default_to_id=1)
+ if key:
+ value = [link.get(entry, key) for entry in value]
+ value = ', '.join(value)
+ m.append('%s: %s'%(propname, value))
+ m.insert(0, '----------')
+ m.insert(0, '')
+ return '\n'.join(m)
+
def generateChangeNote(self, nodeid, oldvalues):
"""Generate a change note that lists property changes
"""
#
# $Log: not supported by cvs2svn $
+# Revision 1.39 2002/01/14 02:20:15 richard
+# . changed all config accesses so they access either the instance or the
+# config attriubute on the db. This means that all config is obtained from
+# instance_config instead of the mish-mash of classes. This will make
+# switching to a ConfigParser setup easier too, I hope.
+#
+# At a minimum, this makes migration a _little_ easier (a lot easier in the
+# 0.5.0 switch, I hope!)
+#
# Revision 1.38 2002/01/10 05:57:45 richard
# namespace clobberation
#
diff --git a/roundup/templates/classic/detectors/nosyreaction.py b/roundup/templates/classic/detectors/nosyreaction.py
index 46099e2b462c839f1c941b5759141a8a0a9b7abc..c5c818ebb47f671dd6e49be3edd2dba79214c02d 100644 (file)
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
#
-#$Id: nosyreaction.py,v 1.10 2002-01-11 23:22:29 richard Exp $
+#$Id: nosyreaction.py,v 1.11 2002-01-14 22:21:38 richard Exp $
from roundup import roundupdb
if oldvalues is None:
# the action was a create, so use all the messages in the create
messages = cl.get(nodeid, 'messages')
+ change_note = cl.generateCreateNote(nodeid)
elif oldvalues.has_key('messages'):
# the action was a set (so adding new messages to an existing issue)
m = {}
#
#$Log: not supported by cvs2svn $
+#Revision 1.10 2002/01/11 23:22:29 richard
+# . #502437 ] rogue reactor and unittest
+# in short, the nosy reactor was modifying the nosy list. That code had
+# been there for a long time, and I suspsect it was there because we
+# weren't generating the nosy list correctly in other places of the code.
+# We're now doing that, so the nosy-modifying code can go away from the
+# nosy reactor.
+#
#Revision 1.9 2001/12/15 19:24:39 rochecompaan
# . Modified cgi interface to change properties only once all changes are
# collected, files created and messages generated.
diff --git a/roundup/templates/extended/detectors/nosyreaction.py b/roundup/templates/extended/detectors/nosyreaction.py
index d148b41bba90185c483b3ec8ff37c05a53a05fa5..b3030435a491db0a27eb71acf67e13cbbc37da05 100644 (file)
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
#
-#$Id: nosyreaction.py,v 1.10 2002-01-11 23:22:29 richard Exp $
+#$Id: nosyreaction.py,v 1.11 2002-01-14 22:21:38 richard Exp $
from roundup import roundupdb
if oldvalues is None:
# the action was a create, so use all the messages in the create
messages = cl.get(nodeid, 'messages')
+ change_note = cl.generateCreateNote(nodeid)
elif oldvalues.has_key('messages'):
# the action was a set (so adding new messages to an existing issue)
m = {}
#
#$Log: not supported by cvs2svn $
+#Revision 1.10 2002/01/11 23:22:29 richard
+# . #502437 ] rogue reactor and unittest
+# in short, the nosy reactor was modifying the nosy list. That code had
+# been there for a long time, and I suspsect it was there because we
+# weren't generating the nosy list correctly in other places of the code.
+# We're now doing that, so the nosy-modifying code can go away from the
+# nosy reactor.
+#
#Revision 1.9 2001/12/15 19:24:39 rochecompaan
# . Modified cgi interface to change properties only once all changes are
# collected, files created and messages generated.