Index: openacs-4/contrib/packages/project-manager/tcl/task-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/tcl/Attic/task-procs.tcl,v diff -u -r1.10 -r1.11 --- openacs-4/contrib/packages/project-manager/tcl/task-procs.tcl 10 Jun 2004 20:23:11 -0000 1.10 +++ openacs-4/contrib/packages/project-manager/tcl/task-procs.tcl 11 Jun 2004 20:58:14 -0000 1.11 @@ -1671,3 +1671,56 @@ }] } + + +ad_proc -public pm::task::assignee_filter_select { + {-status_id:required} +} { + Returns a list of lists, people who are assigned tasks with a + status of status_id. Used in the list-builder filters for + the tasks list page. Cached 5 minutes. + + @author Jade Rubick (jader@bread.com) + @creation-date 2004-06-11 + + @param status_id + + @return + + @error +} { + return [util_memoize [list pm::task::assignee_filter_select_helper -status_id $status_id] 1] +} + + +ad_proc -private pm::task::assignee_filter_select_helper { + {-status_id:required} +} { + Returns a list of lists, people who are assigned tasks with a + status of status_id. Used in the list-builder filters for + the tasks list page. Cached 5 minutes. + + @author Jade Rubick (jader@bread.com) + @creation-date 2004-06-11 + + @param status_id + + @return + + @error +} { + return [db_list_of_lists get_people " + SELECT + distinct(first_names || ' ' || last_name) as fullname, + u.person_id + FROM + persons u, + pm_task_assignment a, + pm_tasks ts + WHERE + u.person_id = a.party_id and + ts.task_id = a.task_id and + ts.status = :status_id + ORDER BY + fullname"] +}