Index: openacs-4/contrib/packages/project-manager/www/process-one.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/www/Attic/process-one.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/contrib/packages/project-manager/www/process-one.tcl 6 Oct 2003 22:57:28 -0000 1.2 +++ openacs-4/contrib/packages/project-manager/www/process-one.tcl 7 Oct 2003 00:15:09 -0000 1.3 @@ -74,7 +74,6 @@ -bulk_action_export_vars { process_id project_id - {my_key 1} } \ -main_class { narrow Index: openacs-4/contrib/packages/project-manager/www/process-task-add-edit-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/www/Attic/process-task-add-edit-postgresql.xql,v diff -u -r1.2 -r1.3 --- openacs-4/contrib/packages/project-manager/www/process-task-add-edit-postgresql.xql 3 Oct 2003 22:21:45 -0000 1.2 +++ openacs-4/contrib/packages/project-manager/www/process-task-add-edit-postgresql.xql 7 Oct 2003 00:15:09 -0000 1.3 @@ -1,55 +1,23 @@ - - - update - pm_process_task - set - process_task_id = :process_task_id, - process_id = :process_id, - one_line = :one_line, - description = :desc, - estimated_hours_work = :work, - estimated_hours_work_min = :work_min, - estimated_hours_work_max = :work_max - - - + - select - current_timestamp + SELECT + process_task_id, + one_line, + description, + estimated_hours_work, + estimated_hours_work_min, + estimated_hours_work_max FROM - dual - - - - - - select - t.process_id, - t.one_line as task_title, - t.description, - t.estimated_hours_work, - t.estimated_hours_work_min, - t.estimated_hours_work_max - FROM - pm_process_task t LEFT JOIN pm_process_task_dependency d ON d.process_task_id = t.process_task_id + pm_process_task WHERE - t.process_task_id in ([join $process_task_id ","]) + process_task_id in ([join $process_task_id ", "]) + ORDER BY + process_task_id - - - SELECT - p.project_id - FROM - pm_projectsx p, cr_items i - WHERE - p.item_id = :project_item_id and - p.revision_id = i.live_revision - - Index: openacs-4/contrib/packages/project-manager/www/process-task-add-edit.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/www/Attic/process-task-add-edit.adp,v diff -u -r1.3 -r1.4 --- openacs-4/contrib/packages/project-manager/www/process-task-add-edit.adp 3 Oct 2003 23:13:15 -0000 1.3 +++ openacs-4/contrib/packages/project-manager/www/process-task-add-edit.adp 7 Oct 2003 00:15:09 -0000 1.4 @@ -18,7 +18,7 @@  @num.rownum@   -Subject:*

+Subject:*

Description:
Index: openacs-4/contrib/packages/project-manager/www/process-task-add-edit.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/www/Attic/process-task-add-edit.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/contrib/packages/project-manager/www/process-task-add-edit.tcl 3 Oct 2003 23:52:17 -0000 1.3 +++ openacs-4/contrib/packages/project-manager/www/process-task-add-edit.tcl 7 Oct 2003 00:15:09 -0000 1.4 @@ -23,10 +23,13 @@ @param process_id The process that we're adding or editing items for. @param number The number of Tasks to create + + @param process_task_id If we are editing tasks, this will be the value we receive } { process_id:integer,notnull {number:integer "1"} + {process_task_id:integer,multiple ""} } -properties { @@ -49,36 +52,62 @@ # --------------------------------------------------------------- # - - -template::multirow create num process_task_id - -for {set i 1} {$i <= $number} {incr i} { - - set process_task_id_tmp [db_nextval pm_process_task_seq] - template::multirow append num $process_task_id_tmp -} - - +# ----------- # terminology +# ----------- + set task_term [parameter::get -parameter "TaskName" -default "Task"] set task_term_lower [parameter::get -parameter "taskname" -default "task"] set use_uncertain_completion_times_p [parameter::get -parameter "UseUncertainCompletionTimesP" -default "1"] - +# -------------------------------------- # the unique identifier for this package +# -------------------------------------- + set package_id [ad_conn package_id] set user_id [ad_maybe_redirect_for_registration] - +# -------------------- # permissions and more +# -------------------- set title "Add a process $task_term_lower" set context_bar [ad_context_bar [list "process-one?process_id=$process_id" "One"] "Add tasks"] permission::require_permission -party_id $user_id -object_id $package_id -privilege create +# ------------------------------------------------------------ +# if process_task_id is set, then we are editing process tasks +# ------------------------------------------------------------ -set user_id [ad_conn user_id] -set peeraddr [ad_conn peeraddr] +if {[info exists process_task_id]} { + set process_tasks [list] + set i 1 + + db_foreach get_process_tasks { } { + set process_task_v($i) $process_task_id + set one_line.$i $one_line + set description_v($i) $description + set estimated_hours_work_v($i) $estimated_hours_work + set estimated_hours_work_min_v($i) $estimated_hours_work_min + set estimated_hours_work_max_v($i) $estimated_hours_work_max + + lappend process_tasks $process_task_id + incr i + } + set number [llength $process_tasks] +} + +template::multirow create num process_task_id + +for {set i 1} {$i <= $number} {incr i} { + + set process_task_id_tmp [db_nextval pm_process_task_seq] + template::multirow append num $process_task_id_tmp +} + + + + +