Skip to content

Commit 3cc9c9a

Browse files
author
Richard Jones
committed
make it work
1 parent 7d5d314 commit 3cc9c9a

File tree

2 files changed

+16
-6
lines changed

2 files changed

+16
-6
lines changed

detectors/newissuecopy.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ def newissuecopy(db, cl, nodeid, oldvalues):
1111
# send a copy to the nosy list
1212
for msgid in cl.get(nodeid, 'messages'):
1313
try:
14-
cl.send_message(nodeid, msgid, change_note, '[email protected]')
14+
# note: last arg must be a list
15+
cl.send_message(nodeid, msgid, change_note, ['[email protected]'])
1516
except roundupdb.MessageSendError, message:
1617
raise roundupdb.DetectorError, message
1718

roundup/roundupdb.py

Lines changed: 14 additions & 5 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.50 2002-04-08 03:40:31 richard Exp $
18+
# $Id: roundupdb.py,v 1.51 2002-04-08 03:46:42 richard Exp $
1919

2020
__doc__ = """
2121
Extending hyperdb with types specific to issue-tracking.
@@ -343,6 +343,9 @@ def nosymessage(self, nodeid, msgid, change_note):
343343

344344
# we have new recipients
345345
if sendto:
346+
# map userids to addresses
347+
sendto = [users.get(i, 'address') for i in sendto]
348+
346349
# update the message's recipients list
347350
messages.set(msgid, recipients=recipients)
348351

@@ -372,14 +375,11 @@ def send_message(self, nodeid, msgid, note, sendto):
372375
self.classname, nodeid, self.db.config.MAIL_DOMAIN)
373376
messages.set(msgid, messageid=messageid)
374377

375-
# figure the author's id
376-
authid = messages.get(msgid, 'author')
377-
378378
# send an email to the people who missed out
379-
sendto = [users.get(i, 'address') for i in sendto]
380379
cn = self.classname
381380
title = self.get(nodeid, 'title') or '%s message copy'%cn
382381
# figure author information
382+
authid = messages.get(msgid, 'author')
383383
authname = users.get(authid, 'realname')
384384
if not authname:
385385
authname = users.get(authid, 'username')
@@ -620,6 +620,15 @@ def generateChangeNote(self, nodeid, oldvalues):
620620

621621
#
622622
# $Log: not supported by cvs2svn $
623+
# Revision 1.50 2002/04/08 03:40:31 richard
624+
# . added a "detectors" directory for people to put their useful auditors and
625+
# reactors in. Note - the roundupdb.IssueClass.sendmessage method has been
626+
# split and renamed "nosymessage" specifically for things like the nosy
627+
# reactor, and "send_message" which just sends the message.
628+
#
629+
# The initial detector is one that we'll be using here at ekit - it bounces new
630+
# issue messages to a team address.
631+
#
623632
# Revision 1.49 2002/03/19 06:41:49 richard
624633
# Faster, easier, less mess ;)
625634
#

0 commit comments

Comments
 (0)