Index: openacs-4/contrib/packages/project-manager/www/task-assign-add-edit.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/www/Attic/task-assign-add-edit.tcl,v diff -u -r1.8.2.2 -r1.8.2.3 --- openacs-4/contrib/packages/project-manager/www/task-assign-add-edit.tcl 20 May 2004 17:30:05 -0000 1.8.2.2 +++ openacs-4/contrib/packages/project-manager/www/task-assign-add-edit.tcl 20 May 2004 17:35:19 -0000 1.8.2.3 @@ -22,14 +22,10 @@ revisions:multiple role_id:array,optional party_id:array,optional -<<<<<<< task-assign-add-edit.tcl {return_url ""} -======= - {return_url ""} {edit_p "t"} {comment_list ""} {old_description:html ""} ->>>>>>> 1.15 } -properties { @@ -44,18 +40,6 @@ # --------------------------------------------------------------- # -<<<<<<< task-assign-add-edit.tcl - -if {[string equal [llength task_id] 1] && [exists_and_not_null return_url]} { - - # if the task is closed, then we don't need to reassign things - if {[string equal 0 [pm::task::open_p -task_item_id $task_id]]} { - ad_returnredirect $return_url - } -} - -======= ->>>>>>> 1.15 # hack to get around lack of multiple hidden support with ad_form set old_description [string map {"-" " "} $old_description] @@ -64,21 +48,7 @@ set revisions [string map {"-" " "} $revisions] set task_id [string map {"-" " "} $task_id] -<<<<<<< task-assign-add-edit.tcl -# The number of assignments is set to 9, or the number of assignees + -# 2 if there are more than 5 assignees -set NUMBER_OF_ASSIGNMENTS 9 - -# find out the maximum number of assignees -db_foreach get_count "select count(task_id) as my_count from pm_task_assignment where task_id in ([join $task_id ", "]) group by task_id" { - if {$my_count > $NUMBER_OF_ASSIGNMENTS} { - set NUMBER_OF_ASSIGNMENTS [expr $my_count + 2] - } -} - -======= - # We have passed in a list of comments and old_description. We will # key them by task number @@ -122,7 +92,6 @@ } } ->>>>>>> 1.15 db_multirow tasks get_task_info { } # create a multirow we can use to iterate @@ -151,10 +120,6 @@ # permissions -<<<<<<< task-assign-add-edit.tcl -set title "Add $task_term_lower assignments" -set context [list [list "one?project_item_id=$project_item_id" "One $project_term"] "New $task_term dependency"] -======= if {[string equal $edit_p "t"]} { set title "Edit $task_term_lower assignments" set context [list "Edit $task_term assignments"] @@ -163,7 +128,6 @@ set context [list "Add $task_term assignments"] } ->>>>>>> 1.15 permission::require_permission -party_id $user_id -object_id $package_id -privilege create @@ -294,17 +258,9 @@ set role_oneline($val) $des } -<<<<<<< task-assign-add-edit.tcl # ideally, we want to replace this with notifications, but I never # got it working correctly, so I use acs_mail_lite - set from_address [db_string get_email "select email from parties where party_id = :user_id"] - -======= - # ideally, we want to replace this with notifications, but I never - # got it working correctly, so I use acs_mail_lite - ->>>>>>> 1.15 foreach pl $party_list { regexp {(.*),(.*)} $pl match task_id_v num_value @@ -313,71 +269,6 @@ set r_id $assignment_role($pl) set p_id $assignment_party($pl) -<<<<<<< task-assign-add-edit.tcl - set to_address [db_string get_email "select email from parties where party_id = :p_id"] - - set subject "Task \#$t_id: $one_lines($t_id)" - - set task_url "[parameter::get_from_package_key -package_key acs-kernel -parameter SystemURL][ad_conn package_url]task-one?task_id=$t_id" - - if {[string equal $use_uncertain_completion_times_p 1]} { - set estimated_work " -Hrs work (min): $est_hours_work_min($t_id) -Hrs work (max): $est_hours_work_max($t_id)" - } else { - set estimated_work " -Hrs work: $est_hours_work($t_id)" - -} - set notification_text "------------- -Task overview -------------- -Task ID: \#$t_id -Description: $one_lines($t_id) -Project: $project_name -Your role: $role_oneline($r_id) -Link: $task_url - ---------------- -Estimated work: ----------------$estimated_work - ------- -Dates: ------- -Earliest start: $earliest_starts($item_id) -Earliest finish: $earliest_finishes($item_id) -Latest start: $latest_starts($item_id) -Latest finish $latest_finishes($item_id) - ------------ -Description ------------ -$descriptions($t_id)" - - - acs_mail_lite::send \ - -to_addr $to_address \ - -from_addr $from_address \ - -subject $subject \ - -body $notification_text - - # we only want to do this for new people - # notification::request::new \ - # -type_id "[notification::type::get_type_id -short_name pm_task_notif]" \ - # -object_id $t_id \ - # -user_id $p_id \ - # -interval_id [notification::interval::get_id_from_name -name instant] \ - # -delivery_method_id [notification::delivery::get_id -short_name email] - - # send out notifications - # notification::new \ - # -type_id [notification::type::get_type_id -short_name pm_task_notif] \ - # -object_id $t_id \ - # -response_id $t_id \ - # -notif_subject $subject \ - # -notif_text $notification_text -======= # If there is a comment for this task, then display it # prominently in the email set my_comment $comment_value($t_id) @@ -418,7 +309,6 @@ # -response_id $t_id \ # -notif_subject $subject \ # -notif_text $notification_text ->>>>>>> 1.15 db_dml add_assignment { } @@ -500,24 +390,16 @@ } -after_submit { -<<<<<<< task-assign-add-edit.tcl if {[exists_and_not_null return_url]} { ad_returnredirect $return_url } else { - ad_returnredirect "one?project_item_id=$project_item_id" - } -======= - if {[exists_and_not_null return_url]} { - ad_returnredirect $return_url - } else { if {[llength $task_id] > 1} { ad_returnredirect "tasks" } else { ad_returnredirect "task-one?task_id=$task_id" } } ->>>>>>> 1.15 ad_script_abort }