From: richard Date: Mon, 24 Feb 2003 05:16:58 +0000 (+0000) Subject: applied (cleaned up version of) patch from sf feature 625808 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=31a67eba29c5321f5e98b35c5916f029aebe932f;p=roundup.git applied (cleaned up version of) patch from sf feature 625808 git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@1542 57a73879-2fb5-44c3-a270-3262357dd7e2 --- diff --git a/CHANGES.txt b/CHANGES.txt index b2008b5..eaacd19 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -57,6 +57,8 @@ are given with the most recent entry first. - altered Class.create() and FileClass.create() methods to make "content" property available in auditors - re-worked detectors initialisation - woohoo, no more cross-importing! +- can now configure CC to author only for messages creating issues (sf + feature 625808) 2003-??-?? 0.5.6 diff --git a/roundup/roundupdb.py b/roundup/roundupdb.py index ca310e2..0bf115d 100644 --- a/roundup/roundupdb.py +++ b/roundup/roundupdb.py @@ -15,7 +15,7 @@ # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. # -# $Id: roundupdb.py,v 1.81 2003-02-17 06:45:38 richard Exp $ +# $Id: roundupdb.py,v 1.82 2003-02-24 05:16:57 richard Exp $ __doc__ = """ Extending hyperdb with types specific to issue-tracking. @@ -130,9 +130,16 @@ class IssueClass: # possibly send the message to the author, as long as they aren't # anonymous - if (self.db.config.MESSAGES_TO_AUTHOR == 'yes' and - users.get(authid, 'username') != 'anonymous'): - sendto.append(authid) + if (users.get(authid, 'username') != 'anonymous' and + not r.has_key(authid)): + if self.db.config.MESSAGES_TO_AUTHOR == 'yes': + # always CC the author of the message + sendto.append(authid) + recipients.append(authid) + elif self.db.config.MESSAGES_TO_AUTHOR == 'new' and not oldvalues: + # only CC the author if the issue is new + sendto.append(authid) + recipients.append(authid) r[authid] = 1 # now deal with cc people.