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.2.2.3 -r1.2.2.4 --- openacs-4/contrib/packages/project-manager/tcl/project-manager-procs.tcl 2 Jul 2004 23:13:48 -0000 1.2.2.3 +++ openacs-4/contrib/packages/project-manager/tcl/project-manager-procs.tcl 9 Jul 2004 17:38:28 -0000 1.2.2.4 @@ -513,3 +513,5 @@ return $return_val } + + 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.3 -r1.4.2.4 --- openacs-4/contrib/packages/project-manager/tcl/task-procs.tcl 2 Jul 2004 23:13:49 -0000 1.4.2.3 +++ openacs-4/contrib/packages/project-manager/tcl/task-procs.tcl 9 Jul 2004 17:38:28 -0000 1.4.2.4 @@ -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/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.12.2.4 -r1.12.2.5 --- openacs-4/contrib/packages/project-manager/www/task-add-edit.adp 2 Jul 2004 23:13:49 -0000 1.12.2.4 +++ openacs-4/contrib/packages/project-manager/www/task-add-edit.adp 9 Jul 2004 17:38:28 -0000 1.12.2.5 @@ -90,7 +90,7 @@ - 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.23.2.3 -r1.23.2.4 --- openacs-4/contrib/packages/project-manager/www/task-one.adp 7 Jul 2004 23:28:21 -0000 1.23.2.3 +++ openacs-4/contrib/packages/project-manager/www/task-one.adp 9 Jul 2004 17:38:28 -0000 1.23.2.4 @@ -152,16 +152,8 @@
Work required: + Total work required: *

- 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.24.2.2 -r1.24.2.3 --- openacs-4/contrib/packages/project-manager/www/task-one.tcl 2 Jul 2004 23:13:49 -0000 1.24.2.2 +++ openacs-4/contrib/packages/project-manager/www/task-one.tcl 9 Jul 2004 17:38:28 -0000 1.24.2.3 @@ -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.5.2.2 -r1.5.2.3 --- openacs-4/contrib/packages/project-manager/www/tasks.tcl 2 Jul 2004 23:13:49 -0000 1.5.2.2 +++ openacs-4/contrib/packages/project-manager/www/tasks.tcl 9 Jul 2004 17:38:28 -0000 1.5.2.3 @@ -126,9 +126,8 @@ @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" } project_item_id { label "Project" @@ -222,12 +221,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 +230,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 +248,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] }