Index: openacs-4/packages/project-manager/www/tasks-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/www/tasks-postgresql.xql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/project-manager/www/tasks-postgresql.xql 29 Apr 2005 17:43:38 -0000 1.1 +++ openacs-4/packages/project-manager/www/tasks-postgresql.xql 30 Apr 2005 06:59:34 -0000 1.2 @@ -5,11 +5,12 @@ SELECT - ts.task_id as task_item_id, + ts.task_id, ts.task_number, t.task_revision_id, t.title, - t.description, + t.description, + tst.description as status, t.parent_id as project_item_id, proj_rev.logger_project, proj_rev.title as project_name, @@ -32,6 +33,7 @@ r.one_line as role FROM pm_tasks_active ts, + pm_task_status tst, cr_items i, pm_tasks_revisionsx t LEFT JOIN pm_task_assignment ta @@ -45,15 +47,48 @@ pm_projectsx proj_rev WHERE ts.task_id = t.item_id and + tst.status_id = status and i.item_id = t.item_id and t.task_revision_id = i.live_revision and t.parent_id = proj.item_id and proj.live_revision = proj_rev.revision_id and proj.parent_id = f.folder_id and f.package_id = :package_id + [template::list::page_where_clause -and -name "tasks" -key "ts.task_id"] [template::list::filter_where_clauses -and -name tasks] [template::list::orderby_clause -orderby -name tasks] + + + select distinct task_id from ( + SELECT + ts.task_id + FROM + pm_tasks_active ts, + cr_items i, + pm_tasks_revisionsx t + LEFT JOIN pm_task_assignment ta + ON t.item_id = ta.task_id + LEFT JOIN persons p + ON ta.party_id = p.person_id + LEFT JOIN pm_roles r + ON ta.role_id = r.role_id, + cr_items proj, + cr_folders f, + pm_projectsx proj_rev + WHERE + ts.task_id = t.item_id and + i.item_id = t.item_id and + t.task_revision_id = i.live_revision and + t.parent_id = proj.item_id and + proj.live_revision = proj_rev.revision_id + and proj.parent_id = f.folder_id + and f.package_id = :package_id + [template::list::filter_where_clauses -and -name tasks] + [template::list::orderby_clause -orderby -name tasks]) as tasks + + +