Mercurial > p > roundup > code
diff detectors/newissuecopy.py @ 691:3d8ce8e2dcee search_indexing-0-4-2-branch
[[Metadata associated with this commit was garbled during conversion from CVS
to Subversion.]]
| author | Roche Compaan <rochecompaan@users.sourceforge.net> |
|---|---|
| date | Mon, 15 Apr 2002 23:25:16 +0000 |
| parents | |
| children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/detectors/newissuecopy.py Mon Apr 15 23:25:16 2002 +0000 @@ -0,0 +1,21 @@ +# copied from nosyreaction + +from roundup import roundupdb + +def newissuecopy(db, cl, nodeid, oldvalues): + ''' Copy a message about new issues to a team address. + ''' + # so use all the messages in the create + change_note = cl.generateCreateNote(nodeid) + + # send a copy to the nosy list + for msgid in cl.get(nodeid, 'messages'): + try: + # 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 + +def init(db): + db.issue.react('create', newissuecopy) +
