Index: openacs-4/contrib/packages/project-manager/www/task-one-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/www/Attic/task-one-postgresql.xql,v diff -u -r1.18 -r1.19 --- openacs-4/contrib/packages/project-manager/www/task-one-postgresql.xql 26 Feb 2004 15:15:41 -0000 1.18 +++ openacs-4/contrib/packages/project-manager/www/task-one-postgresql.xql 12 Mar 2004 13:44:45 -0000 1.19 @@ -1,28 +1,5 @@ - - - SELECT - t.item_id - FROM - pm_tasks_revisionsx t - WHERE - t.revision_id = :task_revision_id - - - - - - SELECT - t.revision_id as task_revision_id - FROM - pm_tasks_revisionsx t, cr_items i - WHERE - t.item_id = :task_id and - i.live_revision = t.revision_id - - - SELECT @@ -119,7 +96,7 @@ i.live_revision, d.parent_task_id, d.dependency_type, - d.task_id + d.task_id as d_task_id FROM pm_tasks_revisionsx t, cr_items i, pm_task_dependency d WHERE @@ -148,4 +125,50 @@ + + + SELECT + x.task_id_1 as x_task_id, + r.title, + to_char(r.earliest_start,'YYYY-MM-DD HH24:MI') as earliest_start, + r.earliest_start - current_date as days_to_earliest_start, + to_char(r.earliest_start,'J') as earliest_start_j, + to_char(r.earliest_finish,'YYYY-MM-DD HH24:MI') as earliest_finish, + r.earliest_finish - current_date as days_to_earliest_finish, + to_char(r.latest_start,'YYYY-MM-DD HH24:MI') as latest_start, + r.latest_start - current_date as days_to_latest_start, + to_char(r.latest_start,'J') as latest_start_j, + to_char(current_date,'J') as today_j, + to_char(r.latest_finish,'YYYY-MM-DD HH24:MI') as latest_finish, + r.latest_finish - current_date as days_to_latest_finish + FROM + pm_task_xref x, pm_tasks_revisionsx r, cr_items i + WHERE + x.task_id_2 = :task_id and + x.task_id_2 = r.item_id and + r.revision_id = i.live_revision + UNION + SELECT + x2.task_id_2 as x_task_id, + r2.title, + to_char(r2.earliest_start,'YYYY-MM-DD HH24:MI') as earliest_start, + r2.earliest_start - current_date as days_to_earliest_start, + to_char(r2.earliest_start,'J') as earliest_start_j, + to_char(r2.earliest_finish,'YYYY-MM-DD HH24:MI') as earliest_finish, + r2.earliest_finish - current_date as days_to_earliest_finish, + to_char(r2.latest_start,'YYYY-MM-DD HH24:MI') as latest_start, + r2.latest_start - current_date as days_to_latest_start, + to_char(r2.latest_start,'J') as latest_start_j, + to_char(current_date,'J') as today_j, + to_char(r2.latest_finish,'YYYY-MM-DD HH24:MI') as latest_finish, + r2.latest_finish - current_date as days_to_latest_finish + FROM + pm_task_xref x2, pm_tasks_revisionsx r2, cr_items i2 + WHERE + x2.task_id_1 = :task_id and + x2.task_id_1 = r2.item_id and + i2.live_revision = r2.revision_id + + +