diff options
author | nishanth | 2010-03-01 04:44:49 +0530 |
---|---|---|
committer | nishanth | 2010-03-01 04:44:49 +0530 |
commit | 22f86093698c68207c89c57c42e10fa56d73935c (patch) | |
tree | 9c3223151a8fd415f15277748e01c27e3fb6b108 /taskapp/events/task.py | |
parent | 87428b64d3a02ce6bde8df83a0ffb115440ecaa7 (diff) | |
download | pytask-22f86093698c68207c89c57c42e10fa56d73935c.tar.gz pytask-22f86093698c68207c89c57c42e10fa56d73935c.tar.bz2 pytask-22f86093698c68207c89c57c42e10fa56d73935c.zip |
finalised the view_task page.
Diffstat (limited to 'taskapp/events/task.py')
-rw-r--r-- | taskapp/events/task.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/taskapp/events/task.py b/taskapp/events/task.py index 2d5cadf..5d018e4 100644 --- a/taskapp/events/task.py +++ b/taskapp/events/task.py @@ -27,8 +27,11 @@ def publishTask(task, rem_mentors=True, rem_comments=True): task.comment_set.update(deleted_by=task.created_by) task.published_datetime = datetime.now() - task.save() + + pending_requests = task.request_task.filter(is_valid=True, is_replied=False) + pending_requests.update(is_valid=False) + return task def addSubTask(main_task, sub_task): @@ -233,12 +236,12 @@ def closeTask(task, closed_by, reason=None): ## generate notifications here for a_user in task.assigned_users.all(): - create_notification(role="CD", sent_to=a_user, sent_from=marked_by, task=task) + create_notification(role="CD", sent_to=a_user, sent_from=closed_by, task=task, remarks=reason) for a_user in task.claimed_users.all(): - create_notification(role="CD", sent_to=a_user, sent_from=marked_by, task=task) + create_notification(role="CD", sent_to=a_user, sent_from=closed_by, task=task, remarks=reason) for a_mentor in task.mentors.all(): - create_notification(role="CD", sent_to=a_mentor, sent_from=marked_by, task=task) + create_notification(role="CD", sent_to=a_mentor, sent_from=closed_by, task=task, remarks=reason) |