Index: openacs-4/contrib/packages/project-manager/tcl/task-procs-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/tcl/Attic/task-procs-postgresql.xql,v diff -u -r1.4.2.3 -r1.4.2.4 --- openacs-4/contrib/packages/project-manager/tcl/task-procs-postgresql.xql 16 Sep 2004 18:25:36 -0000 1.4.2.3 +++ openacs-4/contrib/packages/project-manager/tcl/task-procs-postgresql.xql 23 Sep 2004 21:46:41 -0000 1.4.2.4 @@ -129,4 +129,25 @@ :package_id) + + + + SELECT + t.process_task_id as process_tid, + t.one_line, + t.description, + t.estimated_hours_work, + t.estimated_hours_work_min, + t.estimated_hours_work_max, + d.dependency_id, + d.parent_task_id as process_parent_task + FROM + pm_process_task t LEFT JOIN pm_process_task_dependency d ON t.process_task_id = d.process_task_id + WHERE + t.process_id = :process_id + ORDER BY + t.ordering, + t.process_task_id + + 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.4.2.21 -r1.4.2.22 --- openacs-4/contrib/packages/project-manager/tcl/task-procs.tcl 17 Sep 2004 23:13:42 -0000 1.4.2.21 +++ openacs-4/contrib/packages/project-manager/tcl/task-procs.tcl 23 Sep 2004 21:46:41 -0000 1.4.2.22 @@ -1866,3 +1866,76 @@ ORDER BY fullname"] } + + +ad_proc -public pm::task::process_task_info { + {-process_id:required} + {-one_line_array:required} + {-description_array:required} + {-estimated_hours_work_array:required} + {-estimated_hours_work_min_array:required} + {-estimated_hours_work_max_array:required} + {-dependency_array:required} + {-tasks_list:required} +} { + Sets a bunch of information in a set of arrays on all + process tasks for a given process + + @author Jade Rubick (jader@bread.com) + @creation-date 2004-09-23 + + @param process_id + + @param one_line_array + + @param description_array + + @param estimated_hours_work_array + + @param estimated_hours_work_min_array + + @param estimated_hours_work_max_array + + @param dependency_array + + @param tasks_list + + @return + + @error +} { + + # set variables in calling environment, using names passed in + upvar 1 $one_line_array one_line_arr + upvar 1 $description_array description_arr + upvar 1 $estimated_hours_work_array estimated_hours_work_arr + upvar 1 $estimated_hours_work_min_array estimated_hours_work_min_arr + upvar 1 $estimated_hours_work_max_array estimated_hours_work_max_arr + upvar 1 $dependency_array dependency_arr + upvar 1 $tasks_list process_tasks_l + + db_foreach get_process_tasks { } { + set one_line_arr($process_tid) $one_line + set description_arr($process_tid) $description + set estimated_hours_work_arr($process_tid) $estimated_hours_work + set estimated_hours_work_min_arr($process_tid) $estimated_hours_work_min + set estimated_hours_work_max_arr($process_tid) $estimated_hours_work_max + set dependency_arr($process_tid) $process_parent_task + + # make sure that we don't have empty values for estimated + # hours work + if {[empty_string_p $estimated_hours_work_arr($process_tid)]} { + set estimated_hours_work_arr($process_tid) 0 + } + if {[empty_string_p $estimated_hours_work_min_arr($process_tid)]} { + set estimated_hours_work_min_arr($process_tid) 0 + } + if {[empty_string_p $estimated_hours_work_max_arr($process_tid)]} { + set estimated_hours_work_max_arr($process_tid) 0 + } + + + lappend process_tasks_l $process_tid + } + +} Index: openacs-4/contrib/packages/project-manager/www/task-add-edit-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/www/Attic/task-add-edit-postgresql.xql,v diff -u -r1.15.2.2 -r1.15.2.3 --- openacs-4/contrib/packages/project-manager/www/task-add-edit-postgresql.xql 2 Jul 2004 23:13:49 -0000 1.15.2.2 +++ openacs-4/contrib/packages/project-manager/www/task-add-edit-postgresql.xql 23 Sep 2004 21:46:42 -0000 1.15.2.3 @@ -1,26 +1,5 @@ - - - SELECT - t.process_task_id as process_tid, - t.one_line, - t.description, - t.estimated_hours_work, - t.estimated_hours_work_min, - t.estimated_hours_work_max, - d.dependency_id, - d.parent_task_id as process_parent_task - FROM - pm_process_task t LEFT JOIN pm_process_task_dependency d ON t.process_task_id = d.process_task_id - WHERE - t.process_id = :process_id - ORDER BY - t.ordering, - t.process_task_id - - - select Index: openacs-4/contrib/packages/project-manager/www/task-add-edit.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/www/Attic/task-add-edit.tcl,v diff -u -r1.27.2.10 -r1.27.2.11 --- openacs-4/contrib/packages/project-manager/www/task-add-edit.tcl 16 Sep 2004 19:35:52 -0000 1.27.2.10 +++ openacs-4/contrib/packages/project-manager/www/task-add-edit.tcl 23 Sep 2004 21:46:42 -0000 1.27.2.11 @@ -152,30 +152,17 @@ # modify the interface a little bit set using_process_p t - db_foreach get_process_tasks { } { - set one_line_v($process_tid) $one_line - set description_v($process_tid) $description - set estimated_hours_work_v($process_tid) $estimated_hours_work - set estimated_hours_work_min_v($process_tid) $estimated_hours_work_min - set estimated_hours_work_max_v($process_tid) $estimated_hours_work_max - set dependency_v($process_tid) $process_parent_task + # get all the process task info + pm::task::process_task_info \ + -process_id $process_id \ + -one_line_array one_line_v \ + -description_array description_v \ + -estimated_hours_work_array estimated_hours_work_v \ + -estimated_hours_work_min_array estimated_hours_work_min_v \ + -estimated_hours_work_max_array estimated_hours_work_max_v \ + -dependency_array dependency_v \ + -tasks_list process_tasks - # make sure that we don't have empty values for estimated - # hours work - if {[empty_string_p $estimated_hours_work_v($process_tid)]} { - set estimated_hours_work_v($process_tid) 0 - } - if {[empty_string_p $estimated_hours_work_min_v($process_tid)]} { - set estimated_hours_work_min_v($process_tid) 0 - } - if {[empty_string_p $estimated_hours_work_max_v($process_tid)]} { - set estimated_hours_work_max_v($process_tid) 0 - } - - - lappend process_tasks $process_tid - } - set number [llength $process_tasks] } @@ -190,7 +177,8 @@ # we sort this because we want to keep the ordering # consistent. Otherwise, we can run into problems when editing -# multiple tasks. Their values can get crossed. +# multiple tasks. Their values can get crossed, causing bad things +# to happen set task_id [lsort -integer $task_id] # --------------------------------------------------------------- #