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.9 -r1.4.2.10 --- openacs-4/contrib/packages/project-manager/tcl/task-procs.tcl 16 Jul 2004 20:59:40 -0000 1.4.2.9 +++ openacs-4/contrib/packages/project-manager/tcl/task-procs.tcl 19 Aug 2004 00:01:27 -0000 1.4.2.10 @@ -450,6 +450,8 @@ -title:required -description:required {-mime_type "text/plain"} + {-comment ""} + {-comment_type "text/plain"} -end_date:required -percent_complete:required -estimated_hours_work:required @@ -474,6 +476,9 @@ @param description + @param comment The comment to send out by email if the task + is closed. Otherwise, it is NOT sent out. + @param mime_type @param end_date @@ -531,9 +536,15 @@ # 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 + pm::task::close \ + -task_item_id $task_item_id \ + -comment "$comment" \ + -comment_type $comment_type } else { - pm::task::open -task_item_id $task_item_id + # does not need comment because that's done later + pm::task::open \ + -task_item_id $task_item_id + } return $return_val @@ -983,6 +994,8 @@ ad_proc -public pm::task::close { -task_item_id:required + {-comment ""} + {-comment_type "text/plain"} } { Closes a task, and sends notifications, unless it was already closed. If it was already closed, does nothing. @@ -1118,7 +1131,10 @@ set task_description [ad_html_text_convert -from $mime_type -to "text/plain" -- $task_description] + set comment [ad_html_text_convert -from $comment_type -to "text/plain" -- $comment] + append notification_text " +$comment ------------- Task ID: \#$task_item_id Description: $task_title