Mercurial > p > roundup > code
changeset 685:de6dc74a4148
make it work
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Mon, 08 Apr 2002 03:46:42 +0000 |
| parents | 5b23ff865f3a |
| children | c52122f38c9b |
| files | detectors/newissuecopy.py roundup/roundupdb.py |
| diffstat | 2 files changed, 16 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/detectors/newissuecopy.py Mon Apr 08 03:40:31 2002 +0000 +++ b/detectors/newissuecopy.py Mon Apr 08 03:46:42 2002 +0000 @@ -11,7 +11,8 @@ # send a copy to the nosy list for msgid in cl.get(nodeid, 'messages'): try: - cl.send_message(nodeid, msgid, change_note, 'team@team.host') + # note: last arg must be a list + cl.send_message(nodeid, msgid, change_note, ['team@team.host']) except roundupdb.MessageSendError, message: raise roundupdb.DetectorError, message
--- a/roundup/roundupdb.py Mon Apr 08 03:40:31 2002 +0000 +++ b/roundup/roundupdb.py Mon Apr 08 03:46:42 2002 +0000 @@ -15,7 +15,7 @@ # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. # -# $Id: roundupdb.py,v 1.50 2002-04-08 03:40:31 richard Exp $ +# $Id: roundupdb.py,v 1.51 2002-04-08 03:46:42 richard Exp $ __doc__ = """ Extending hyperdb with types specific to issue-tracking. @@ -343,6 +343,9 @@ # we have new recipients if sendto: + # map userids to addresses + sendto = [users.get(i, 'address') for i in sendto] + # update the message's recipients list messages.set(msgid, recipients=recipients) @@ -372,14 +375,11 @@ self.classname, nodeid, self.db.config.MAIL_DOMAIN) messages.set(msgid, messageid=messageid) - # figure the author's id - authid = messages.get(msgid, 'author') - # send an email to the people who missed out - sendto = [users.get(i, 'address') for i in sendto] cn = self.classname title = self.get(nodeid, 'title') or '%s message copy'%cn # figure author information + authid = messages.get(msgid, 'author') authname = users.get(authid, 'realname') if not authname: authname = users.get(authid, 'username') @@ -620,6 +620,15 @@ # # $Log: not supported by cvs2svn $ +# Revision 1.50 2002/04/08 03:40:31 richard +# . added a "detectors" directory for people to put their useful auditors and +# reactors in. Note - the roundupdb.IssueClass.sendmessage method has been +# split and renamed "nosymessage" specifically for things like the nosy +# reactor, and "send_message" which just sends the message. +# +# The initial detector is one that we'll be using here at ekit - it bounces new +# issue messages to a team address. +# # Revision 1.49 2002/03/19 06:41:49 richard # Faster, easier, less mess ;) #
