Index: openacs-4/packages/project-manager/tcl/project-manager-callback-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/tcl/project-manager-callback-procs.tcl,v diff -u -r1.11 -r1.12 --- openacs-4/packages/project-manager/tcl/project-manager-callback-procs.tcl 12 Mar 2006 16:54:58 -0000 1.11 +++ openacs-4/packages/project-manager/tcl/project-manager-callback-procs.tcl 3 May 2006 18:02:11 -0000 1.12 @@ -43,6 +43,12 @@ } { } +ad_proc -public -callback pm::project_unassign { + {-project_id:required} + {-party_id:required} +} { +} + ad_proc -public -callback pm::project_links { {-project_id:required} } { Index: openacs-4/packages/project-manager/tcl/project-procs-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/tcl/project-procs-postgresql.xql,v diff -u -r1.10 -r1.11 --- openacs-4/packages/project-manager/tcl/project-procs-postgresql.xql 19 Dec 2005 20:06:26 -0000 1.10 +++ openacs-4/packages/project-manager/tcl/project-procs-postgresql.xql 3 May 2006 18:02:11 -0000 1.11 @@ -388,7 +388,7 @@ - + select distinct Index: openacs-4/packages/project-manager/tcl/project-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/tcl/project-procs.tcl,v diff -u -r1.31 -r1.32 --- openacs-4/packages/project-manager/tcl/project-procs.tcl 21 Mar 2006 17:21:44 -0000 1.31 +++ openacs-4/packages/project-manager/tcl/project-procs.tcl 3 May 2006 18:02:11 -0000 1.32 @@ -1824,6 +1824,7 @@ ad_proc -public pm::project::unassign { {-project_item_id:required} {-party_id:required} + -no_callback:boolean } { Removes a user from a project @@ -1852,6 +1853,10 @@ util_memoize_flush [list pm::role::project_select_list_filter_not_cached -project_item_id $project_item_id -party_id $party_id] } + if {!$no_callback_p} { + callback pm::project_unassign -project_id $project_item_id -party_id $party_id + } + return } @@ -3274,6 +3279,17 @@ } ad_proc -public pm::project::get_all_subprojects { + {-project_item_id:required} +} { + get all subprojects. cached. + + @author Malte Sussdorff (malte.sussdorff@cognovis.de) +} { + return [util_memoize [list ::pm::project::get_all_subprojects_not_cached -project_item_id $project_item_id]] +} + + +ad_proc -public pm::project::get_all_subprojects_not_cached { -project_item_id:required } { @author Miguel Marin (miguelmarin@viaro.net) Index: openacs-4/packages/project-manager/tcl/task-procs-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/tcl/task-procs-postgresql.xql,v diff -u -r1.6 -r1.7 --- openacs-4/packages/project-manager/tcl/task-procs-postgresql.xql 19 Sep 2005 16:16:00 -0000 1.6 +++ openacs-4/packages/project-manager/tcl/task-procs-postgresql.xql 3 May 2006 18:02:12 -0000 1.7 @@ -334,6 +334,21 @@ + + + SELECT + party_id, + pta.role_id, + is_lead_p, + is_observer_p + FROM + pm_task_assignment pta, pm_roles r + WHERE + task_id = :task_item_id + and pta.role_id = r.role_id + + + UPDATE Index: openacs-4/packages/project-manager/tcl/task-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/tcl/task-procs.tcl,v diff -u -r1.19 -r1.20 --- openacs-4/packages/project-manager/tcl/task-procs.tcl 12 Mar 2006 16:54:58 -0000 1.19 +++ openacs-4/packages/project-manager/tcl/task-procs.tcl 3 May 2006 18:02:12 -0000 1.20 @@ -2271,6 +2271,27 @@ } +ad_proc -public pm::task::assignee_role_list_ext { + {-task_item_id:required} +} { + Returns a list of lists, with all assignees to a particular + task. {{party_id role_id} {party_id role_id}} + + Todo: dependency changes, deadline changes + + @author Jade Rubick (jader@bread.com) + @creation-date 2004-10-18 + + @param task_item_id + + @return + + @error +} { + + return [db_list_of_lists get_assignees { }] +} + ad_proc -public pm::task::what_changed { {-comments_array:required} {-comments_mime_type_array:required} Index: openacs-4/packages/project-manager/www/comments/add.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/www/comments/add.tcl,v diff -u -r1.7 -r1.8 --- openacs-4/packages/project-manager/www/comments/add.tcl 12 Mar 2006 16:54:58 -0000 1.7 +++ openacs-4/packages/project-manager/www/comments/add.tcl 3 May 2006 18:02:11 -0000 1.8 @@ -41,6 +41,7 @@ set show_role_p 1 set assignee_list [list] + if { $exclude_observers_p } { foreach assignee $assignees { # Compare the role_id to the one get on observer_role_id @@ -56,6 +57,7 @@ } else { lappend assignee_list [list "$name ($email)" $email] } + } } } else { @@ -78,6 +80,24 @@ lappend listed_emails [lindex $assignee 1] } + +# Include subprojects +foreach subproject_id [pm::project::get_all_subprojects -project_item_id $object_id] { + set sub_assignees [pm::project::assignee_role_list -project_item_id $subproject_id] + foreach assignee $sub_assignees { + if { [string equal [lsearch $observer_role_id [lindex $assignee 1]] "-1"] || $exclude_observers_p != 1 } { + set name [contact::name -party_id [lindex $assignee 0]] + set email [party::email -party_id [lindex $assignee 0]] + + if {[lsearch -exact $listed_emails $email] == -1} { + lappend assignee_list [list "$name ($email)" $email] + lappend listed_emails $email + } + } + } +} + + set employee_list [group::get_members -group_id [group::get_id -group_name "Employees"]] foreach employee_id $employee_list { set name [contact::name -party_id $employee_id]