Index: openacs-4/packages/project-manager/lib/projects-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/lib/projects-postgresql.xql,v diff -u -r1.8 -r1.9 --- openacs-4/packages/project-manager/lib/projects-postgresql.xql 14 Sep 2005 22:54:27 -0000 1.8 +++ openacs-4/packages/project-manager/lib/projects-postgresql.xql 21 Oct 2005 00:52:50 -0000 1.9 @@ -70,7 +70,7 @@ p.project_id = i.live_revision and rx.object_id = i2.live_revision and i.parent_id = f.folder_id - and f.package_id in ($package_ids) + $previous_status_where_clause and exists (select 1 from acs_object_party_privilege_map ppm where ppm.object_id = p.project_id and ppm.privilege = 'read' Index: openacs-4/packages/project-manager/lib/projects.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/lib/projects.tcl,v diff -u -r1.22 -r1.23 --- openacs-4/packages/project-manager/lib/projects.tcl 19 Sep 2005 21:02:23 -0000 1.22 +++ openacs-4/packages/project-manager/lib/projects.tcl 21 Oct 2005 00:52:50 -0000 1.23 @@ -8,7 +8,7 @@ set required_param_list [list package_id] set optional_param_list [list orderby status_id searchterm bulk_p action_p \ filter_p base_url end_date_f user_space_p hidden_vars] -set optional_unset_list [list assignee_id date_range is_observer_p] +set optional_unset_list [list assignee_id date_range is_observer_p previous_status_f] set dotlrn_installed_p [apm_package_installed_p dotlrn] set user_id [ad_conn user_id] @@ -180,6 +180,13 @@ set user_space_clause "pa.role_id = pr.role_id and pr.is_observer_p = :is_observer_p and f.package_id = :package_id" } +# If this filter is provided we can watch the projects in +# all project manager instances +set previous_status_where_clause "" +if { ![exists_and_not_null previous_status_f] } { + set previous_status_where_clause "and f.package_id in ($package_ids)" +} + set filters [list \ searchterm [list \ label "[_ project-manager.Search_1]" \ @@ -211,6 +218,11 @@ values { {True t } { False f} } \ where_clause { $user_space_clause } ] \ + previous_status_f [list \ + label "[_ project-manager.Previous_Status]" \ + values { [pm::status::project_status_select] } \ + where_clause { exists ( select 1 from pm_projectsx pf where pf.status_id = :previous_status_f and pf.item_id = p.item_id ) } + ] \ ] Index: openacs-4/packages/project-manager/www/index.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/www/index.adp,v diff -u -r1.10 -r1.11 --- openacs-4/packages/project-manager/www/index.adp 7 Sep 2005 14:27:21 -0000 1.10 +++ openacs-4/packages/project-manager/www/index.adp 21 Oct 2005 00:53:25 -0000 1.11 @@ -5,5 +5,5 @@ #project-manager.Projects# @context;noquote@ - + Index: openacs-4/packages/project-manager/www/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/www/index.tcl,v diff -u -r1.9 -r1.10 --- openacs-4/packages/project-manager/www/index.tcl 26 Aug 2005 17:00:30 -0000 1.9 +++ openacs-4/packages/project-manager/www/index.tcl 21 Oct 2005 00:53:25 -0000 1.10 @@ -26,6 +26,7 @@ {assignee_id ""} {user_space_p "0"} {is_observer_p ""} + {previous_status_f ""} } -properties {