Index: openacs-4/contrib/packages/project-manager/www/add-edit.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/www/Attic/add-edit.tcl,v diff -u -r1.12.2.8 -r1.12.2.9 --- openacs-4/contrib/packages/project-manager/www/add-edit.tcl 27 Feb 2004 22:46:13 -0000 1.12.2.8 +++ openacs-4/contrib/packages/project-manager/www/add-edit.tcl 6 Mar 2004 00:29:24 -0000 1.12.2.9 @@ -123,21 +123,9 @@ {options {[db_list_of_lists get_status_codes { }]}} } - } \ - -new_request { - - if {[string equal $ongoing_by_default_p t]} { - set ongoing_p t - } - - set planned_end_date [util::date acquire clock [clock scan $planned_end_date]] - - set planned_start_date [util::date acquire clock [clock scan $planned_start_date]] - } - if {[exists_and_not_null project_id]} { if {![empty_string_p [category_tree::get_mapped_trees $package_id]]} { ad_form -extend -name add_edit -form { @@ -187,9 +175,21 @@ set user_id [ad_conn user_id] set peeraddr [ad_conn peeraddr] + + } \ + -new_request { - } -new_data { + if {[string equal $ongoing_by_default_p t]} { + set ongoing_p t + } + set planned_end_date [util::date acquire clock [clock scan $planned_end_date]] + + set planned_start_date [util::date acquire clock [clock scan $planned_start_date]] + + } \ + -new_data { + set project_id [pm::project::new \ -project_name $project_name \ -project_code $project_code \ @@ -230,6 +230,25 @@ # it until it is edited. So we need to pull in these values set old_project_id $project_id + set project_id [pm::project::edit \ + -project_item_id $project_item_id \ + -project_name $project_name \ + -project_code $project_code \ + -parent_id $parent_id \ + -goal $goal \ + -description $description \ + -planned_start_date $planned_start_date \ + -planned_end_date $planned_end_date \ + -actual_start_date "" \ + -actual_end_date "" \ + -logger_project $logger_project \ + -ongoing_p $ongoing_p \ + -status_id $status_id \ + -organization_id $customer_id \ + -creation_user $user_id \ + -creation_ip $peeraddr \ + -package_id $package_id] + set project_id [db_exec_plsql new_project_revision { *SQL* }] pm::project::compute_parent_status $project_item_id @@ -246,4 +265,3 @@ } } -ns_log Notice "end of it all"