comparison detectors/newissuecopy.py @ 4627:6b32e9dac625

Restore sample detectors removed by 07c5d833dcb2 (issue2550574)
author Thomas Arendsen Hein <thomas@intevation.de>
date Wed, 16 May 2012 11:17:03 +0200
parents
children 39c9f69c3f31
comparison
equal deleted inserted replaced
4626:e3cd5fcf710b 4627:6b32e9dac625
1 # copied from nosyreaction
2
3 from roundup import roundupdb
4
5 def newissuecopy(db, cl, nodeid, oldvalues):
6 ''' Copy a message about new issues to a team address.
7 '''
8 # so use all the messages in the create
9 change_note = cl.generateCreateNote(nodeid)
10
11 # send a copy to the nosy list
12 for msgid in cl.get(nodeid, 'messages'):
13 try:
14 # note: last arg must be a list
15 cl.send_message(nodeid, msgid, change_note, ['team@team.host'])
16 except roundupdb.MessageSendError, message:
17 raise roundupdb.DetectorError, message
18
19 def init(db):
20 db.issue.react('create', newissuecopy)
21
22 # vim: set filetype=python ts=4 sw=4 et si

Roundup Issue Tracker: http://roundup-tracker.org/