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.8 -r1.2.2.9 --- openacs-4/contrib/packages/project-manager/tcl/project-manager-procs.tcl 21 Sep 2004 00:29:44 -0000 1.2.2.8 +++ openacs-4/contrib/packages/project-manager/tcl/project-manager-procs.tcl 23 Sep 2004 22:00:06 -0000 1.2.2.9 @@ -29,6 +29,36 @@ } +ad_proc -public pm::util::reformat_date { + the_date +} { + the end date comes in this format 2004 05 17 + we need to get it in the {2004} {05} {17} {} {} {} format + + @author Jade Rubick (jader@bread.com) + + @creation-date 2004-09-23 + + + @param the_date + + + @return + + @error +} { + + regexp {(.*) (.*) (.*)} $the_date match year month day + if {[exists_and_not_null year]} { + set return_val "$year $month $day {} {} {}" + } else { + set return_val "{} {} {} {} {} {}" + } + + return $return_val +} + + ad_proc -public pm::util::string_truncate_and_pad { -length {-ellipsis "..."} 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.27.2.11 -r1.27.2.12 --- openacs-4/contrib/packages/project-manager/www/task-add-edit.tcl 23 Sep 2004 21:46:42 -0000 1.27.2.11 +++ openacs-4/contrib/packages/project-manager/www/task-add-edit.tcl 23 Sep 2004 22:00:10 -0000 1.27.2.12 @@ -480,16 +480,8 @@ # We need the date to be in the right format in order to pass # through the validate filter. + set end_date_arr($i) [pm::util::reformat_date $my_end_date] - # the end date comes in this format 2004 05 17 - # we need to get it in the {2004} {05} {17} {} {} {} format - regexp {(.*) (.*) (.*)} $my_end_date match year month day - if {[exists_and_not_null year]} { - set end_date_arr($i) "$year $month $day {} {} {}" - } else { - set end_date_arr($i) "{} {} {} {} {} {}" - } - set percent_complete_arr($i) $my_percent_complete set actual_hours_worked_arr($i) $my_actual_hours_worked set project_item_id_arr($i) $my_project_item_id @@ -928,10 +920,6 @@ set p_task_title $task_title($i) set p_description $description($i) - - # ns_log Notice "Format: $description_format($i)" - - set p_mime_type $description_format($i) set p_work $estimated_hours_work($i) @@ -945,8 +933,6 @@ # we don't do anything for the comments field, because they # are not added in for new tasks. - # ns_log Notice "end date: $p_end_date" - # add in the new task if {[string equal $p_skip_p "f"]} {