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.10 -r1.11 --- openacs-4/packages/project-manager/lib/tasks.tcl 10 Aug 2005 21:15:36 -0000 1.10 +++ openacs-4/packages/project-manager/lib/tasks.tcl 10 Aug 2005 22:22:26 -0000 1.11 @@ -113,7 +113,7 @@ if {[info exists party_id]} { unset party_id - } + } if {[regexp {([0-9]+)} $searchterm match query_digits]} { set search_term_where " (upper(t.title) like upper('%$searchterm%') @@ -169,6 +169,20 @@ set element "actual_${days_string}_worked" } + + # We need to filter by the user if a party_id is given + if {[exists_and_not_null party_id]} { + set party_where_clause "and t.party_id = :party_id" + + # Do we want to show observer tasks as well? + if {[parameter::get -parameter "ShowObserverTasksP"] == 0} { + append party_where_clause "\n and r.is_observer_p = 'f' " + } + } else { + set party_where_clause "" + } + + # If we display the items of a single user, show the role. Otherwise # show all players. @@ -188,7 +202,7 @@ label "[_ project-manager.People]" \ values "[pm::task::assignee_filter_select \ -status_id $status_id]" \ - where_clause "ta.party_id = :party_id" + where_clause "" ] ] }