Index: openacs-4/contrib/packages/simulation/www/simplay/task-detail.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/www/simplay/Attic/task-detail.tcl,v diff -u -r1.17 -r1.18 --- openacs-4/contrib/packages/simulation/www/simplay/task-detail.tcl 30 Jan 2004 10:57:08 -0000 1.17 +++ openacs-4/contrib/packages/simulation/www/simplay/task-detail.tcl 30 Jan 2004 11:17:16 -0000 1.18 @@ -79,10 +79,10 @@ set body_mime_type [template::util::richtext::get_property "format" $body] db_transaction { - workflow::case::action::execute \ - -enabled_action_id $enabled_action_id \ - -comment $body_text \ - -comment_mime_type $body_mime_type + set entry_id [workflow::case::action::execute \ + -enabled_action_id $enabled_action_id \ + -comment $body_text \ + -comment_mime_type $body_mime_type] foreach recipient_id $action(recipients) { simulation::message::new \ @@ -92,7 +92,8 @@ -subject $subject \ -body $body_text \ -body_mime_type $body_mime_type \ - -attachments $attachments + -attachments $attachments \ + -entry_id $entry_id } } @@ -117,14 +118,14 @@ } -on_submit { db_transaction { - simulation::ui::forms::document_upload::insert_document \ - $case_id $role_id $item_id $document_file $title $description + set entry_id [workflow::case::action::execute \ + -case_id $case_id \ + -action_id $action_id \ + -comment "Document [lindex $document_file 0] uploaded" \ + -comment_mime_type "text/plain"] - workflow::case::action::execute \ - -case_id $case_id \ - -action_id $action_id \ - -comment "Document [lindex $document_file 0] uploaded" \ - -comment_mime_type "text/plain" + simulation::ui::forms::document_upload::insert_document \ + $case_id $role_id $item_id $document_file $title $description $entry_id } ad_returnredirect [export_vars -base tasks { case_id role_id }]