taskapp/events/task.py
changeset 126 e5377fdaf110
parent 125 d3cfceb8e120
child 131 85276c5aee5c
--- a/taskapp/events/task.py	Fri Feb 26 23:22:23 2010 +0530
+++ b/taskapp/events/task.py	Sat Feb 27 00:48:50 2010 +0530
@@ -222,9 +222,23 @@
     task.status = "CM"
     task.save()
 
-    task.request_task.filter(is_replied=False).update(is_valid=False)
+    pending_requests = task.request_task.filter(is_replied=False)
+    pending_requests.update(is_valid=False)
 
     ## generate notification appropriately using marked_by
     ## we also have to mark unread requests as invalid
 
+def closeTask(task, closed_by):
+    """ set the status of task as CD.
+    generate notifications accordingly.
+    """
 
+    task.status = "CD"
+    task.save()
+
+    pending_requests = task.request_task.filter(is_replied=False)
+    pending_requests.update(is_valid=False)
+
+    ## generate notifications here
+
+