From 73146283818829589f1c064b53df44b6e9eab744 Mon Sep 17 00:00:00 2001 From: Cyril Robert Date: Thu, 27 May 2010 11:48:15 -0400 Subject: [PATCH] Ajout option creation_cc --- roundup/configuration.py | 3 +++ share/roundup/templates/classic/detectors/nosyreaction.py | 8 +++++++- 2 files changed, 10 insertions(+), 1 deletion(-) 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): -- 1.7.10.4