Index: openacs-4/packages/project-manager/tcl/task-procs-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/tcl/task-procs-postgresql.xql,v diff -u -r1.1 -r1.1.2.1 --- openacs-4/packages/project-manager/tcl/task-procs-postgresql.xql 29 Apr 2005 17:43:37 -0000 1.1 +++ openacs-4/packages/project-manager/tcl/task-procs-postgresql.xql 30 Nov 2005 06:47:37 -0000 1.1.2.1 @@ -3,65 +3,6 @@ postgresql7.3 - - - SELECT - r.title - FROM - cr_items i, - cr_revisions r - WHERE - i.item_id = r.item_id and - i.item_id = :task_item_id and - i.live_revision = r.revision_id - - - - - - SELECT - i.item_id - FROM - cr_items i, - cr_revisions r - WHERE - i.item_id = r.item_id and - r.revision_id = :task_id - - - - - - SELECT - live_revision - FROM - cr_items i - WHERE - i.item_id = :task_item_id - - - - - - select status - from pm_tasks - where task_id = :task_item_id - - - - - - SELECT - case when status_type = 'c' then 0 else 1 end as open_p - FROM - pm_tasks t, - pm_task_status s - WHERE - task_id = :task_item_id and - t.status = s.status_id - - - select status_id @@ -80,100 +21,6 @@ - - - DELETE FROM - pm_task_dependency - WHERE - task_id = :task_item_id - - - - - - SELECT - task.item_id as t_item_id - FROM - cr_items task, - cr_items project - WHERE - task.parent_id = project.item_id and - project.item_id = :project_item_id - - - - - - SElECT - d.task_id as dep_task, - d.parent_task_id as dep_task_parent - FROM - pm_task_dependency d - WHERE - d.task_id in ([join $project_tasks ", "]) - - - - - - INSERT INTO - pm_task_dependency - (dependency_id, - task_id, - parent_task_id, - dependency_type) - values - (:dependency_id, - :task_item_id, - :parent_id, - 'finish_before_start') - - - - - - SELECT - r.item_id, - r.title as task_title - FROM - pm_tasks_revisionsx r, - cr_items i, - pm_tasks t, - pm_task_status s - WHERE - r.parent_id = :project_item_id and - r.revision_id = i.live_revision and - i.item_id = t.task_id and - t.status = s.status_id and - s.status_type = 'o' - $union_clause - ORDER BY - task_title - - - - - - SELECT - r.item_id, - r.title as task_title - FROM - pm_tasks_revisionsx r, - cr_items i, - pm_tasks t, - pm_task_status s - WHERE - r.parent_id = :project_item_id and - r.revision_id = i.live_revision and - i.item_id = t.task_id and - t.status = s.status_id and - s.status_type = 'o' - $union_clause - ORDER BY - task_title - - - select pm_task__new_task_revision ( @@ -197,23 +44,6 @@ - - - UPDATE - logger_entries - SET - project_id = :logger_project - WHERE - entry_id in - (select - logger_entry - from - pm_task_logger_proj_map - where - task_item_id = :task_item_id) - - - select pm_task__new_task_item ( @@ -236,150 +66,17 @@ - - + - SELECT - p.email as from_address, - p2.first_names || ' ' || p2.last_name as mod_username - FROM - parties p, - persons p2 - WHERE - p.party_id = :user_id and - p.party_id = p2.person_id - - - - - SELECT - t.title as subject, - t.description, - t.mime_type as description_mime_type, - to_char(t.earliest_start,'MM-DD-YYYY') as earliest_start, - to_char(t.earliest_finish,'MM-DD-YYYY') as earliest_finish, - to_char(t.latest_start,'MM-DD-YYYY') as latest_start, - to_char(t.latest_finish,'MM-DD-YYYY') as latest_finish, - t.estimated_hours_work as work, - t.estimated_hours_work_min as work_min, - t.estimated_hours_work_max as work_max, - t.percent_complete, - p.title as project_name, - t.parent_id as project_item_id, - a.process_instance + party_id FROM - pm_tasks_revisionsx t, - pm_tasks_active a, - cr_items i, - cr_items project, - pm_projectsx p - WHERE - t.item_id = :task_item_id and - t.item_id = a.task_id and - t.revision_id = i.live_revision and - t.item_id = i.item_id and - t.parent_id = project.item_id and - project.item_id = p.item_id and - project.live_revision = p.revision_id - - - - - - SELECT - p.email as to_address, - r.one_line as role, - r.is_lead_p - FROM - pm_task_assignment a, - parties p, - pm_roles r - WHERE - task_id = :task_item_id and - a.party_id = p.party_id and - a.role_id = r.role_id - - - - - - - SELECT - t.title as one_line, - t.description, - t.mime_type as description_mime_type, - t.estimated_hours_work as estimated_hours_work, - t.estimated_hours_work_min as estimated_hours_work_min, - t.estimated_hours_work_max as estimated_hours_work_max, - t.percent_complete, - to_char(t.end_date, 'DD') as end_date_day, - to_char(t.end_date, 'MM') as end_date_month, - to_char(t.end_date, 'YYYY') as end_date_year, - d.parent_task_id, - i.item_id as tid, - t.parent_id as project, - t.priority - FROM - pm_tasks_revisionsx t, - cr_items i - LEFT JOIN - pm_task_dependency d - ON i.item_id = d.task_id - WHERE - t.revision_id = i.live_revision and - t.item_id = i.item_id - $task_where_clause - - - - - - - SELECT - party_id, - role_id - FROM pm_task_assignment WHERE - task_id = :task_item_id + task_id = :task_item_id and + party_id = :party_id + LIMIT 1 - - - - UPDATE - pm_tasks - SET - status = :status_code - WHERE - task_id = :task_item_id - - - - - - UPDATE - pm_tasks - SET - status = :status_code - WHERE - task_id = :task_item_id - - - - - - SELECT - p.first_names || ' ' || p.last_name - FROM - pm_task_assignment a, - persons p - WHERE - task_id = :task_item_id and - a.party_id = p.person_id - - -