Index: openacs-4/packages/tasks/lib/tasks-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/tasks/lib/tasks-postgresql.xql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/tasks/lib/tasks-postgresql.xql 28 Sep 2005 19:21:08 -0000 1.2 +++ openacs-4/packages/tasks/lib/tasks-postgresql.xql 29 Sep 2005 13:17:53 -0000 1.3 @@ -33,9 +33,8 @@ where s.status_id = t.status_id and ao.object_id = t.task_id - and ao.creation_user = :contact_id - and t.party_id = :contact_id and t.start_date < now() + [template::list::filter_where_clauses -and -name tasks] [template::list::orderby_clause -orderby -name tasks] Index: openacs-4/packages/tasks/lib/tasks.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/tasks/lib/tasks.adp,v diff -u -r1.2 -r1.3 --- openacs-4/packages/tasks/lib/tasks.adp 28 Sep 2005 19:21:08 -0000 1.2 +++ openacs-4/packages/tasks/lib/tasks.adp 29 Sep 2005 13:17:53 -0000 1.3 @@ -1,6 +1,7 @@

+ #tasks.Add_Task# -#tasks.Assign_Process# +#tasks.Assign_Process#

- + Index: openacs-4/packages/tasks/lib/tasks.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/tasks/lib/tasks.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/tasks/lib/tasks.tcl 28 Sep 2005 19:21:08 -0000 1.2 +++ openacs-4/packages/tasks/lib/tasks.tcl 29 Sep 2005 13:17:53 -0000 1.3 @@ -1,12 +1,13 @@ -set user_id [ad_conn user_id] set tasks_url "/tasks/" -if { ![info exist contact_id] } { - set contact_id $party_id -} - -if { ![contact::exists_p -party_id $contact_id] } { +# If we are not viewing the tasks of a party, view the tasks of the user +if {![exists_and_not_null party_id]} { + set user_id [ad_conn user_id] set contact_id $user_id + set user_id2 $user_id +} else { + set contact_id $party_id + set user_id2 "" } if { ![exists_and_not_null orderby] } { @@ -84,7 +85,12 @@ narrow } \ -filters { - party_id {} + party_id { + where_clause {t.party_id = :party_id} + } + user_id { + where_clause {ao.creation_user = :user_id} + } } -orderby { default_value "priority,desc" date { @@ -119,7 +125,6 @@ } } - db_multirow -extend {creation_user_url contact_url complete_url done_p task_plus_url task_minus_url description_html task_url} -unclobber tasks get_tasks " " { set creation_user_url [contact::url -party_id $creation_user] regsub -all "/tasks/" $creation_user_url "/contacts/" creation_user_url Index: openacs-4/packages/tasks/www/contact.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/tasks/www/contact.adp,v diff -u -r1.3 -r1.4 --- openacs-4/packages/tasks/www/contact.adp 28 Sep 2005 19:24:42 -0000 1.3 +++ openacs-4/packages/tasks/www/contact.adp 29 Sep 2005 13:17:54 -0000 1.4 @@ -1,5 +1,4 @@ @party_id@ - + Index: openacs-4/packages/tasks/www/index.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/tasks/www/index.adp,v diff -u -r1.2 -r1.3 --- openacs-4/packages/tasks/www/index.adp 28 Sep 2005 19:23:56 -0000 1.2 +++ openacs-4/packages/tasks/www/index.adp 29 Sep 2005 13:17:54 -0000 1.3 @@ -2,6 +2,6 @@

- +