@projects.category_select;noquote@
Index: openacs-4/packages/project-manager/lib/tasks-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/lib/tasks-postgresql.xql,v
diff -u -r1.10 -r1.11
--- openacs-4/packages/project-manager/lib/tasks-postgresql.xql 22 Sep 2005 07:40:31 -0000 1.10
+++ openacs-4/packages/project-manager/lib/tasks-postgresql.xql 25 Oct 2005 23:06:00 -0000 1.11
@@ -137,8 +137,19 @@
and ppm.party_id = :user_id)
$done_clause
[template::list::filter_where_clauses -and -name tasks]
- [template::list::orderby_clause -name tasks -orderby]) t
+ [template::list::orderby_clause -name tasks -orderby]) t
+
+
+ select
+ distinct item_id
+ from
+ pm_projectsx
+ where
+ parent_id = :project_item_id
+
+
+
Index: openacs-4/packages/project-manager/lib/tasks.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/lib/tasks.tcl,v
diff -u -r1.26 -r1.27
--- openacs-4/packages/project-manager/lib/tasks.tcl 14 Oct 2005 18:37:29 -0000 1.26
+++ openacs-4/packages/project-manager/lib/tasks.tcl 25 Oct 2005 23:06:00 -0000 1.27
@@ -1,9 +1,10 @@
# Possible
# party_id
# role_id
+
set required_param_list [list]
set optional_param_list [list orderby searchterm status_id page bulk_p actions_p base_url page_num page_size]
-set optional_unset_list [list party_id role_id project_item_id is_observer_p instance_id filter_package_id]
+set optional_unset_list [list party_id role_id project_item_id is_observer_p instance_id filter_package_id subproject_tasks]
set use_bulk_p [parameter::get -parameter "UseBulkP" -default "0"]
@@ -143,6 +144,15 @@
set project_item_clause [pm::project::get_list_of_open -object_package_id $filter_package_id]
}
+if { [exists_and_not_null subproject_tasks]} {
+ set subprojects_list [db_list get_subprojects { } ]
+ lappend subprojects_list $project_item_id
+ set project_item_where_clause "t.parent_id in ([template::util::tcl_to_sql_list $subprojects_list])"
+
+} else {
+ set project_item_where_clause "t.parent_id = :project_item_id"
+}
+
set filters [list \
searchterm [list \
label "[_ project-manager.Search_1]" \
@@ -156,14 +166,14 @@
project_item_id [list \
label "[_ project-manager.Project_1]" \
values { $project_item_clause } \
- where_clause "t.parent_id = :project_item_id"
+ where_clause "$project_item_where_clause"
] \
instance_id [list \
where_clause "ti.process_instance = :instance_id"
] \
is_observer_p [list \
label "[_ project-manager.Observer]" \
- values { {True t} {False f} } \
+ values { {"[_ project-manager.True]" t} { "[_ project-manager.False]" f} } \
where_clause "r.is_observer_p = :is_observer_p"
] \
party_id [list \
@@ -174,7 +184,16 @@
filter_package_id [list \
where_clause "p.object_package_id = :filter_package_id"
] \
- ]
+ ]
+
+if { [exists_and_not_null project_item_id] } {
+ lappend filters subproject_tasks [list \
+ label "[_ project-manager.Subproject_tasks]" \
+ values {{ "[_ project-manager.Show]" 1}} \
+ ]
+
+}
+
# Setup the actions, so we can append the rest later on
if {$actions_p == 1} {
set actions [list "[_ project-manager.Add_task]" [export_vars \
Index: openacs-4/packages/project-manager/www/tasks.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/www/tasks.adp,v
diff -u -r1.6 -r1.7
--- openacs-4/packages/project-manager/www/tasks.adp 22 Sep 2005 07:40:32 -0000 1.6
+++ openacs-4/packages/project-manager/www/tasks.adp 25 Oct 2005 23:06:00 -0000 1.7
@@ -11,7 +11,7 @@
Index: openacs-4/packages/project-manager/www/tasks.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/www/tasks.tcl,v
diff -u -r1.8 -r1.9
--- openacs-4/packages/project-manager/www/tasks.tcl 7 Oct 2005 22:56:50 -0000 1.8
+++ openacs-4/packages/project-manager/www/tasks.tcl 25 Oct 2005 23:06:00 -0000 1.9
@@ -33,6 +33,7 @@
{filter_package_id ""}
{role_id ""}
{base_url ""}
+ {subproject_tasks ""}
} -properties {
task_term:onevalue
context:onevalue