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 -N -r1.15 -r1.16 --- openacs-4/contrib/packages/project-manager/tcl/task-procs.tcl 25 Jun 2004 00:27:10 -0000 1.15 +++ openacs-4/contrib/packages/project-manager/tcl/task-procs.tcl 1 Jul 2004 18:37:13 -0000 1.16 @@ -505,6 +505,7 @@ -task_item_id $task_item_id] } + # simple sanity check for min and max estimated hours if {$estimated_hours_work_min > $estimated_hours_work_max} { set temp $estimated_hours_work_max set estimated_hours_work_max $estimated_hours_work_min @@ -513,6 +514,21 @@ set return_val [db_exec_plsql new_task_revision { *SQL }] + # we have to update all logged hours to make sure the hours are + # updated whenever the project is changed. + + set logger_project [pm::project::get_logger_project -project_item_id $project_item_id] + + db_dml update_logger_entries { + UPDATE + logger_entries + SET + project_id = :logger_project + WHERE + entry_id in + (select logger_entry from pm_task_logger_proj_map where task_item_id = :task_item_id) + } + # if the we've done 100% of the work, then we close the task if {$percent_complete >= 100} { pm::task::close -task_item_id $task_item_id