From: Cyril Robert Date: Thu, 27 May 2010 15:48:15 +0000 (-0400) Subject: Ajout option creation_cc X-Git-Url: http://git.auf.org/?p=auf_roundup.git;a=commitdiff_plain;h=73146283818829589f1c064b53df44b6e9eab744;ds=inline Ajout option creation_cc --- diff --git a/roundup/configuration.py b/roundup/configuration.py index 3ad193d..7627a1e 100644 --- a/roundup/configuration.py +++ b/roundup/configuration.py @@ -675,6 +675,9 @@ SETTINGS = ( "If this is false but add_authorinfo is true, only the name\n" "of the actor is added which protects the mail address of the\n" "actor from being exposed at mail archives, etc."), + (Option, "creation_cc", "", + "Send the creation receipt to them (coma separated)", + ["CREATION_CC"]), ), "Outgoing email options.\nUsed for nozy messages and approval requests"), ("mailgw", ( (BooleanOption, "keep_quoted_text", "yes", diff --git a/share/roundup/templates/classic/detectors/nosyreaction.py b/share/roundup/templates/classic/detectors/nosyreaction.py index 3e99131..ac5f00b 100644 --- a/share/roundup/templates/classic/detectors/nosyreaction.py +++ b/share/roundup/templates/classic/detectors/nosyreaction.py @@ -42,11 +42,17 @@ def nosyreaction(db, cl, nodeid, oldvalues): if oldvalues is None and cl.classname == 'issue': authid = cl.db.getuid() authaddr = cl.db.user.get(authid, 'address', '') + dest = [authaddr,] + + cc = getattr(cl.db.config, 'CREATION_CC', '') + if len(cc) > 0: + dest.extend([x.strip() for x in cc.split(',')]) + title = cl.get(nodeid, 'title') or '%s message copy' % cl.classname msg = "Votre demande d'assistance \"" + title \ + "\" nous a bien été transmise et sera traitée dès que " \ + "possible." - cl.send_message(nodeid, None, msg, [authaddr,]) + cl.send_message(nodeid, None, msg, dest) # send a copy of all new messages to the nosy list for msgid in determineNewMessages(cl, nodeid, oldvalues):