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.1 -r1.2 --- openacs-4/contrib/packages/project-manager/www/process-one.tcl 3 Oct 2003 22:21:45 -0000 1.1 +++ openacs-4/contrib/packages/project-manager/www/process-one.tcl 6 Oct 2003 22:57:28 -0000 1.2 @@ -58,9 +58,6 @@ estimated_hours_work_min { label "Work estimate max" } - end_date { - label "Deadline" - } } \ -orderby { one_line {orderby one_line} Index: openacs-4/contrib/packages/project-manager/www/process-task-assign-add-edit.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/www/Attic/process-task-assign-add-edit.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/contrib/packages/project-manager/www/process-task-assign-add-edit.tcl 3 Oct 2003 23:13:15 -0000 1.2 +++ openacs-4/contrib/packages/project-manager/www/process-task-assign-add-edit.tcl 6 Oct 2003 22:57:28 -0000 1.3 @@ -29,7 +29,7 @@ my_key:integer,optional process_id:integer,notnull process_task_id:notnull,multiple - use_dependency:integer,multiple,optional + {use_dependency:integer,multiple ""} role_id:array,optional party_id:array,optional Index: openacs-4/contrib/packages/project-manager/www/processes.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/www/Attic/processes.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/contrib/packages/project-manager/www/processes.tcl 3 Oct 2003 22:21:45 -0000 1.2 +++ openacs-4/contrib/packages/project-manager/www/processes.tcl 6 Oct 2003 22:57:28 -0000 1.3 @@ -59,6 +59,11 @@ -multirow processes \ -key item_id \ -elements { + process_id { + label "" + display_template { + } + } one_line { label "Subject" display_template { 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.9 -r1.10 --- openacs-4/contrib/packages/project-manager/www/task-add-edit-postgresql.xql 17 Sep 2003 22:20:59 -0000 1.9 +++ openacs-4/contrib/packages/project-manager/www/task-add-edit-postgresql.xql 6 Oct 2003 22:57:28 -0000 1.10 @@ -1,5 +1,23 @@ + + + SELECT + process_task_id, + one_line, + description, + estimated_hours_work, + estimated_hours_work_min, + estimated_hours_work_max + FROM + pm_process_task + WHERE + process_id = :process_id + ORDER BY + process_task_id + + + select pm_task__new_task_item ( 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.19 -r1.20 --- openacs-4/contrib/packages/project-manager/www/task-add-edit.tcl 18 Sep 2003 23:33:54 -0000 1.19 +++ openacs-4/contrib/packages/project-manager/www/task-add-edit.tcl 6 Oct 2003 22:57:28 -0000 1.20 @@ -1,12 +1,3 @@ -ns_log notice it's my page! -set mypage [ns_getform] -if {[string equal "" $mypage]} { - ns_log notice no form was submitted on my page -} else { - ns_log notice the following form was submitted on my page - ns_set print $mypage -} - ad_page_contract { Add/edit form for tasks @@ -28,6 +19,7 @@ @param task_id Specifies the item for the task (every revision of a task shares the same task_id) Also used as the key for the ad_form. For this reason, when editing, we have to pass in task_iid instead @param my_key if set, then ad_form knows that this is an edit @param task_title + @param process_id The process we're using to create this task @param use_dependency_p Whether or not to use dependencies with this task @param use_uncertain_completion_times_p Whether or not to use PERT-style completion time uncertainty 1 = yes } { @@ -40,6 +32,7 @@ task_id:integer,multiple,optional task_item_id:array,optional task_title:array,optional + {process_id:integer ""} use_dependency_p:array,optional description:array,optional name:array,optional @@ -77,11 +70,45 @@ # --------------------------------------------------------------- # +set user_id [ad_maybe_redirect_for_registration] +set package_id [ad_conn package_id] + +# terminology +set project_term [parameter::get -parameter "ProjectName" -default "Project"] +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"] + + if {![exists_and_not_null project_id]} { set project_id [db_string get_project_id { }] } +# -------------------------------------------------------------------- +# If we are using a process, then we need to get the information on +# the process now. This is necessary because we need to do things like +# set the number of tasks we're going to be entering. We save this for +# later, so we can get the values +# -------------------------------------------------------------------- + +set process_tasks [list] + +if {[info exists process_id]} { + db_foreach get_process_tasks { } { + set one_line_v($process_task_id) $one_line + set description_v($process_task_id) $description + set estimated_hours_work_v($process_task_id) $estimated_hours_work + set estimated_hours_work_min_v($process_task_id) $estimated_hours_work_min + set estimated_hours_work_max_v($process_task_id) $estimated_hours_work_max + + lappend process_tasks $process_task_id + } + + set number [llength $process_tasks] +} + + if {![ad_form_new_p -key task_id]} { # create a multirow we can use to iterate # we also set the number variable so we can use that in @@ -150,17 +177,6 @@ } } -# terminology -set project_term [parameter::get -parameter "ProjectName" -default "Project"] -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 if {[exists_and_not_null task_id]} { @@ -310,7 +326,6 @@ set use_dependency_arr($i) "" } - # ----------------------------------------------------- # if we are editing the tasks, then we want to show the # percent_complete @@ -336,6 +351,13 @@ } } else { + # ---------------------------------------------------------- + # if we are using a process, then we want to fill in all the + # default values for the user. + # ---------------------------------------------------------- + + # get the values + for {set i 1} {$i <= $number} {incr i} { set task_title_arr($i) "" set description_arr($i) "" @@ -349,6 +371,20 @@ set actual_hours_worked_arr($i) 0 set task_item_id_arr($i) "" + if {[info exists process_id]} { + + set ptask_id [lindex $process_tasks [expr $i-1]] + + set task_title_arr($i) $one_line_v($ptask_id) + set description_arr($i) $description_v($ptask_id) + set estimated_hours_arr($i) $estimated_hours_work_v($ptask_id) + set estimated_hours_min_arr($i) $estimated_hours_work_min_v($ptask_id) + set estimated_hours_max_arr($i) $estimated_hours_work_max_v($ptask_id) + + # still need to add in dependency information + # and assignment information + } + # ----------------------------------------------------- # for new tasks, we hide the percent_complete # ----------------------------------------------------- Index: openacs-4/contrib/packages/project-manager/www/task-select-project-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/www/Attic/task-select-project-postgresql.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/packages/project-manager/www/task-select-project-postgresql.xql 6 Oct 2003 22:57:28 -0000 1.1 @@ -0,0 +1,16 @@ + + + + + + SELECT + p.item_id as project_item_id, + p.title as project_name + FROM pm_projectsx p, cr_items i + WHERE p.project_id = i.live_revision and + p.parent_id = :root_folder + ORDER BY p.title + + + + Index: openacs-4/contrib/packages/project-manager/www/task-select-project.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/www/Attic/task-select-project.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/packages/project-manager/www/task-select-project.adp 6 Oct 2003 22:57:28 -0000 1.1 @@ -0,0 +1,8 @@ + +@context_bar@ +@title@ + +@form_definition_beg@ + @select_widget@ + +@form_definition_end@ Index: openacs-4/contrib/packages/project-manager/www/task-select-project.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/www/Attic/task-select-project.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/packages/project-manager/www/task-select-project.tcl 6 Oct 2003 22:57:28 -0000 1.1 @@ -0,0 +1,66 @@ +ad_page_contract { + + Page to get the project if one is missing for task creation + + @author jader@bread.com + @creation-date 2003-10-06 + @cvs-id $Id: task-select-project.tcl,v 1.1 2003/10/06 22:57:28 jader Exp $ + + @return context_bar Context bar. + @return title Page title. + @return projects A multirow containing the list of projects + + @param process_id The process we're using to create this task +} { + + {process_id:integer ""} + +} -properties { + + context_bar:onevalue + title:onevalue + select_widget:onevalue + select_widget_name:onevalue + form_definition_beg:onevalue + form_definition_end:onevalue + +} -validate { +} -errors { +} + +# --------------------------------------------------------------- # + +set user_id [ad_maybe_redirect_for_registration] +set package_id [ad_conn package_id] + +# terminology +set project_term [parameter::get -parameter "ProjectName" -default "Project"] +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"] + + +set title "Edit a $task_term_lower" +set context_bar [ad_context_bar [list "processes" "Processes"] "Use"] + + +# need to change this to show all the projects you're on by +# default, and then give you the option of selecting all projects +# as an option. + +set root_folder [db_string get_root "select pm_project__get_root_folder (:package_id, 'f')"] + +set select_widget_name project_item_id +set select_widget "" + +set form_definition_beg "
" + +append form_definition_beg [export_vars -form {process_id}] +set form_definition_end "
" +