Index: openacs-4/contrib/packages/project-manager/project-manager.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/Attic/project-manager.info,v diff -u -r1.32 -r1.33 --- openacs-4/contrib/packages/project-manager/project-manager.info 2 Jul 2004 00:16:02 -0000 1.32 +++ openacs-4/contrib/packages/project-manager/project-manager.info 14 Jul 2004 17:51:02 -0000 1.33 @@ -7,14 +7,14 @@ f f - + Jade Rubick Project management tool for OpenACS - 2004-07-01 + 2004-07-09 Integrated Bakery Resources Track tasks, estimates and actual progress for a project. See the <a href="http://openacs.org/projects/dotwrk/project_management/">project page</a> for more information. - + Index: openacs-4/contrib/packages/project-manager/tcl/project-manager-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/tcl/Attic/project-manager-procs.tcl,v diff -u -r1.12 -r1.13 --- openacs-4/contrib/packages/project-manager/tcl/project-manager-procs.tcl 2 Jul 2004 21:17:04 -0000 1.12 +++ openacs-4/contrib/packages/project-manager/tcl/project-manager-procs.tcl 14 Jul 2004 17:51:06 -0000 1.13 @@ -513,3 +513,5 @@ return $return_val } + + Index: openacs-4/contrib/packages/project-manager/tcl/project-procs-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/tcl/Attic/project-procs-postgresql.xql,v diff -u -r1.5 -r1.6 --- openacs-4/contrib/packages/project-manager/tcl/project-procs-postgresql.xql 27 Apr 2004 00:49:28 -0000 1.5 +++ openacs-4/contrib/packages/project-manager/tcl/project-procs-postgresql.xql 14 Jul 2004 17:51:07 -0000 1.6 @@ -107,6 +107,7 @@ to_char(earliest_finish,'J') as old_earliest_finish_j, to_char(latest_start,'J') as old_latest_start_j, to_char(latest_finish,'J') as old_latest_finish_j, + t.percent_complete as my_percent_complete, s.status_type from pm_tasks_revisionsx t, Index: openacs-4/contrib/packages/project-manager/tcl/project-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/tcl/Attic/project-procs.tcl,v diff -u -r1.19 -r1.20 --- openacs-4/contrib/packages/project-manager/tcl/project-procs.tcl 2 Jul 2004 22:18:16 -0000 1.19 +++ openacs-4/contrib/packages/project-manager/tcl/project-procs.tcl 14 Jul 2004 17:51:07 -0000 1.20 @@ -241,7 +241,17 @@ # with the logger project) set project_revision [db_exec_plsql new_project_item { *SQL }] + set project_item_id [pm::project::get_project_item_id \ + -project_id $project_revision] + set project_role [pm::role::default] + + pm::project::assign \ + -project_item_id $project_item_id \ + -role_id $project_role \ + -party_id $creation_user \ + -send_email_p "f" + return $project_revision } @@ -762,7 +772,7 @@ ns_log Notice "old_task_status: $my_iid $status_type (o=open, c=closed)" } - set activity_time($my_iid) [expr $to_work - $worked] + set activity_time($my_iid) [expr [expr $to_work * [expr 100 - $my_percent_complete] / 100]] if {[exists_and_not_null task_deadline_j]} { 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.16 -r1.17 --- openacs-4/contrib/packages/project-manager/tcl/task-procs.tcl 1 Jul 2004 18:37:13 -0000 1.16 +++ openacs-4/contrib/packages/project-manager/tcl/task-procs.tcl 14 Jul 2004 17:51:08 -0000 1.17 @@ -1628,32 +1628,43 @@ } -ad_proc -public pm::task::estimated_hours_work { - -estimated_hours_work - -estimated_hours_work_min - -estimated_hours_work_max +ad_proc -public pm::task::hours_remaining { + -hours_work:required + -hours_work_min:required + -hours_work_max:required + -percent_complete:required } { - Displays the estimated hours work in a consistent format + Displays the estimated hours work remaining in a consistent format @author Jade Rubick (jader@bread.com) @creation-date 2004-06-02 - @param estimated_hours_work + @param hours_work - @param estimated_hours_work_min + @param hours_work_min - @param estimated_hours_work_max + @param hours_work_max + @param percent_complete + @return @error } { set use_uncertain_completion_times_p [parameter::get -parameter "UseUncertainCompletionTimesP" -default "1"] if {[string equal $use_uncertain_completion_times_p 1]} { - set display_value "$estimated_hours_work_min - $estimated_hours_work_max" + + set display_value1 [expr round($hours_work_min * $percent_complete / 100)] + set display_value2 [expr round($hours_work_max * $percent_complete / 100)] + + if {[string equal $display_value1 $display_value2]} { + set display_value "$display_value1" + } else { + set display_value "$display_value1 - $display_value2" + } } else { - set display_value "$estimated_hours_work" + set display_value [expr round($hours_work * $percent_complete / 100)] } return $display_value Index: openacs-4/contrib/packages/project-manager/www/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/www/Attic/index.tcl,v diff -u -r1.18 -r1.19 --- openacs-4/contrib/packages/project-manager/www/index.tcl 2 Jul 2004 22:18:16 -0000 1.18 +++ openacs-4/contrib/packages/project-manager/www/index.tcl 14 Jul 2004 17:51:08 -0000 1.19 @@ -114,8 +114,7 @@ display_template "@projects.actual_hours_completed@/@projects.estimated_hours_total@" } category_id { - label "Categories" - display_template "@projects.category_name@" + display_template "" } } \ -actions [list "Add project" "add-edit" "Add project" "Customers" "[site_node::get_package_url -package_key organizations]" "View customers"] \ Index: openacs-4/contrib/packages/project-manager/www/task-add-edit.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/www/Attic/task-add-edit.adp,v diff -u -r1.19 -r1.20 --- openacs-4/contrib/packages/project-manager/www/task-add-edit.adp 28 Jun 2004 21:12:22 -0000 1.19 +++ openacs-4/contrib/packages/project-manager/www/task-add-edit.adp 14 Jul 2004 17:51:08 -0000 1.20 @@ -90,7 +90,7 @@ - Work required: + Total work required: * Index: openacs-4/contrib/packages/project-manager/www/task-one.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/www/Attic/task-one.adp,v diff -u -r1.31 -r1.32 --- openacs-4/contrib/packages/project-manager/www/task-one.adp 3 Jun 2004 21:32:13 -0000 1.31 +++ openacs-4/contrib/packages/project-manager/www/task-one.adp 14 Jul 2004 17:51:08 -0000 1.32 @@ -123,7 +123,7 @@ Latest finish - @task_info.latest_start@ + @task_info.latest_finish@ @@ -152,16 +152,8 @@ - Projected: - - @task_info.estimated_hours_work_min@ - - @task_info.estimated_hours_work_max@ hrs - - - @task_info.estimated_hours_work@ hrs - + Hours remaining: @task_info.hours_remaining@ - (@task_info.percent_complete@% complete) Slack: n/a Index: openacs-4/contrib/packages/project-manager/www/task-one.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/www/Attic/task-one.tcl,v diff -u -r1.33 -r1.34 --- openacs-4/contrib/packages/project-manager/www/task-one.tcl 10 Jun 2004 20:38:29 -0000 1.33 +++ openacs-4/contrib/packages/project-manager/www/task-one.tcl 14 Jul 2004 17:51:08 -0000 1.34 @@ -106,6 +106,15 @@ db_1row task_query { } -column_array task_info +# format the hours remaining section + +set task_info(hours_remaining) \ + [pm::task::hours_remaining \ + -hours_work $task_info(estimated_hours_work) \ + -hours_work_min $task_info(estimated_hours_work_min) \ + -hours_work_max $task_info(estimated_hours_work_max) \ + -percent_complete $task_info(percent_complete)] + # format the dates according to the local settings set task_info(earliest_start) [lc_time_fmt $task_info(earliest_start) "%x"] set task_info(earliest_finish) [lc_time_fmt $task_info(earliest_finish) "%x"] Index: openacs-4/contrib/packages/project-manager/www/tasks.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/www/Attic/tasks.tcl,v diff -u -r1.14 -r1.15 --- openacs-4/contrib/packages/project-manager/www/tasks.tcl 11 Jun 2004 20:58:19 -0000 1.14 +++ openacs-4/contrib/packages/project-manager/www/tasks.tcl 14 Jul 2004 17:51:08 -0000 1.15 @@ -126,9 +126,11 @@ @tasks.latest_finish_pretty@ } } - actual_hours_worked { - label "Hours completed" - display_template "@tasks.actual_hours_worked@/@tasks.estimated_hours_work@ (@tasks.percent_complete@\%)" + hours_remaining { + label "Hours remaining" + html { + align right + } } project_item_id { label "Project" @@ -222,12 +224,6 @@ orderby_asc "t.latest_finish, p.first_names, p.last_name" default_direction asc } - actual_hours_worked { - label "Hours completed" - orderby_desc "t.actual_hours_worked desc" - orderby_asc "t.actual_hours_worked" - default_direction asc - } } \ -orderby_name orderby \ -html { @@ -237,7 +233,7 @@ -db_multirow -extend { item_url latest_start_pretty latest_finish_pretty slack_time log_url} tasks tasks { +db_multirow -extend { item_url latest_start_pretty latest_finish_pretty slack_time log_url hours_remaining} tasks tasks { } { set item_url [export_vars -base "task-one" {task_id}] @@ -255,6 +251,12 @@ set slack_time "n/a" } + set hours_remaining \ + [pm::task::hours_remaining \ + -hours_work $estimated_hours_work \ + -hours_work_min $estimated_hours_work_min \ + -hours_work_max $estimated_hours_work_max \ + -percent_complete $percent_complete] }