Code

applied (cleaned up version of) patch from sf feature 625808
authorrichard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2>
Mon, 24 Feb 2003 05:16:58 +0000 (05:16 +0000)
committerrichard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2>
Mon, 24 Feb 2003 05:16:58 +0000 (05:16 +0000)
git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@1542 57a73879-2fb5-44c3-a270-3262357dd7e2

CHANGES.txt
roundup/roundupdb.py

index b2008b5a82bae37a64f6c8cf2d588324969a7950..eaacd1911b716790b0cae3d34fef937546844a36 100644 (file)
@@ -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
index ca310e2f54f43ad9d087cf2153b73aeb8149a52c..0bf115da95f8a627c9103b08a567c5777a164464 100644 (file)
@@ -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.