[Python-checkins] r57737 - tracker/instances/python-dev/detectors/nosyreaction.py

erik.forsberg python-checkins at python.org
Thu Aug 30 19:42:39 CEST 2007


Author: erik.forsberg
Date: Thu Aug 30 19:42:38 2007
New Revision: 57737

Modified:
   tracker/instances/python-dev/detectors/nosyreaction.py
Log:
Fixed problem with assignee not being added to nosy list
automatically. 

Part of solution for http://psf.upfronthosting.co.za/roundup/meta/issue141


Modified: tracker/instances/python-dev/detectors/nosyreaction.py
==============================================================================
--- tracker/instances/python-dev/detectors/nosyreaction.py	(original)
+++ tracker/instances/python-dev/detectors/nosyreaction.py	Thu Aug 30 19:42:38 2007
@@ -44,7 +44,7 @@
     return messages
 
 def updatenosy(db, cl, nodeid, newvalues):
-    '''Update the nosy list for changes to the assignedto
+    '''Update the nosy list for changes to the assignee
     '''
     # nodeid will be None if this is a new node
     current_nosy = sets.Set()
@@ -69,15 +69,15 @@
 
     new_nosy = sets.Set(current_nosy)
 
-    # add assignedto(s) to the nosy list
-    if newvalues.has_key('assignedto') and newvalues['assignedto'] is not None:
+    # add assignee(s) to the nosy list
+    if newvalues.has_key('assignee') and newvalues['assignee'] is not None:
         propdef = cl.getprops()
-        if isinstance(propdef['assignedto'], hyperdb.Link):
-            assignedto_ids = [newvalues['assignedto']]
-        elif isinstance(propdef['assignedto'], hyperdb.Multilink):
-            assignedto_ids = newvalues['assignedto']
-        for assignedto_id in assignedto_ids:
-            new_nosy.add(assignedto_id)
+        if isinstance(propdef['assignee'], hyperdb.Link):
+            assignee_ids = [newvalues['assignee']]
+        elif isinstance(propdef['assignee'], hyperdb.Multilink):
+            assignee_ids = newvalues['assignee']
+        for assignee_id in assignee_ids:
+            new_nosy.add(assignee_id)
 
     # see if there's any new messages - if so, possibly add the author and
     # recipient to the nosy


More information about the Python-checkins mailing list