Index: config.py =================================================================== RCS file: /u/systems/repository/roundup/help/config.py,v retrieving revision 1.1.1.1 diff -u -r1.1.1.1 config.py --- config.py 5 Dec 2003 19:51:40 -0000 1.1.1.1 +++ config.py 5 Jan 2004 18:59:49 -0000 @@ -88,6 +88,9 @@ # creates a new issue. If 'yes', then the recipients will be added on followups # too. If 'no', they're never added to the nosy. ADD_RECIPIENTS_TO_NOSY = 'new' # either 'yes', 'no', 'new' + +# Users to automatically add to the nosy upon issue creation +#ADD_TO_NOSY = ( 'admin' ) # Where to place the email signature EMAIL_SIGNATURE_POSITION = 'bottom' # one of 'top', 'bottom', 'none' Index: detectors/nosyreaction.py =================================================================== RCS file: /u/systems/repository/roundup/help/detectors/nosyreaction.py,v retrieving revision 1.1.1.1 diff -u -r1.1.1.1 nosyreaction.py --- detectors/nosyreaction.py 5 Dec 2003 19:51:40 -0000 1.1.1.1 +++ detectors/nosyreaction.py 5 Jan 2004 18:59:49 -0000 @@ -68,6 +70,14 @@ current = {} if nodeid is None: ok = ('new', 'yes') + # Automatically add configured recipients to the nosy for new issues + add = getattr(db.config, 'ADD_TO_NOSY') + for value in add: + try: + uid = db.user.lookup(value) + current[value] = 1 + except KeyError: + pass else: ok = ('yes',) # old node, get the current values from the node if they haven't @@ -123,12 +133,14 @@ for msgid in messages: if add_author in ok: authid = msg.get(msgid, 'author') - current[authid] = 1 + if not current.has_key(authid): + current[authid] = 1 # add on the recipients of the message if add_recips in ok: for recipient in msg.get(msgid, 'recipients'): - current[recipient] = 1 + if not current.has_key(recipient): + current[recipient] = 1 # that's it, save off the new nosy list newvalues['nosy'] = current.keys()