Index: openacs-4/packages/project-manager-portlet/lib/tasks-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager-portlet/lib/tasks-postgresql.xql,v diff -u -r1.7 -r1.8 --- openacs-4/packages/project-manager-portlet/lib/tasks-postgresql.xql 25 Oct 2005 07:21:45 -0000 1.7 +++ openacs-4/packages/project-manager-portlet/lib/tasks-postgresql.xql 27 Oct 2005 21:44:37 -0000 1.8 @@ -55,7 +55,7 @@ pr.is_lead_p from pm_tasks_revisionsx tr, pm_task_assignment ta, cr_items ci, pm_roles pr, -- Select only tasks where you are participating in a certain role. - (select distinct task_id from pm_task_assignment where party_id = :party_id) my_tasks + (select distinct task_id from pm_task_assignment where party_id = :user_id) my_tasks where ta.task_id = tr.item_id -- We need to join again with the role, as we are supposed to get all the participants -- This is not good... We should probably get them in the TCL view.. @@ -83,5 +83,15 @@ + + + select + username + from + users + where + user_id = :party_id + + Index: openacs-4/packages/project-manager-portlet/lib/tasks.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager-portlet/lib/tasks.tcl,v diff -u -r1.7 -r1.8 --- openacs-4/packages/project-manager-portlet/lib/tasks.tcl 27 Oct 2005 20:19:37 -0000 1.7 +++ openacs-4/packages/project-manager-portlet/lib/tasks.tcl 27 Oct 2005 21:44:37 -0000 1.8 @@ -26,7 +26,6 @@ } } - if ![info exists page_size] { set page_size 25 } @@ -368,22 +367,38 @@ -community_id [dotlrn_community::get_community_id]] set assign_group_p [parameter::get -parameter "AssignGroupP" -default 0 -package_id $pm_package_id] +set user_instead_full_p [parameter::get -parameter "UsernameInsteadofFullnameP" -default "f" -package_id $pm_package_id] + db_multirow -extend {item_url earliest_start_pretty earliest_finish_pretty end_date_pretty latest_start_pretty latest_finish_pretty slack_time edit_url hours_remaining days_remaining actual_days_worked my_user_id user_url base_url task_close_url project_url name} tasks tasks {} { if { $assign_group_p } { # We are going to show all asignees including groups - if { [catch {set name [person::name -person_id $party_id] } err] } { - # person::name give us an error so its probably a group so we get - # the title - set name [group::title -group_id $party_id] - } + if { $user_instead_full_p } { + set name [db_string get_assignee_name { } -default ""] + if { [empty_string_p $name] } { + set name [group::title -group_id $party_id] + } + } else { + if { [catch {set name [person::name -person_id $party_id] } err] } { + # person::name give us an error so its probably a group so we get + # the title + set name [group::title -group_id $party_id] + } + } } else { - if { [catch {set name [person::name -person_id $party_id] } err] } { - # person::name give us an error so its probably a group, here we don't want - # to show any group so we just continue the multirow - continue - } + if { $user_instead_full_p } { + set name [db_string get_assignee_name { } -default ""] + if { [empty_string_p $name] } { + continue + } + } else { + if { [catch {set name [person::name -person_id $party_id] } err] } { + # person::name give us an error so its probably a group, here we don't want + # to show any group so we just continue the multirow + continue + } + } }