Index: openacs-4/packages/bug-tracker/tcl/bug-tracker-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/tcl/bug-tracker-procs.tcl,v diff -u -r1.13.2.8 -r1.13.2.9 --- openacs-4/packages/bug-tracker/tcl/bug-tracker-procs.tcl 3 May 2003 23:53:08 -0000 1.13.2.8 +++ openacs-4/packages/bug-tracker/tcl/bug-tracker-procs.tcl 16 Jul 2003 12:54:17 -0000 1.13.2.9 @@ -1275,6 +1275,7 @@ {action_id} fix_for_version:integer assignee:integer + enabled_action_assignee:integer action_id:integer component_id:integer keyword:integer,multiple @@ -1381,6 +1382,38 @@ } append human_readable_filter " where [join $keyword_human " and "]" } + + if { [info exists filter_enabled_action_assignee] } { + lappend where_clauses { + exists ( + select 1 + from workflow_cases cas2, + workflow_case_fsm cfsm2, + workflow_actions a2, + workflow_case_role_party_map crpm2 + where cas2.object_id = b.bug_id + and (a2.always_enabled_p = 't' + or exists (select 1 + from workflow_fsm_action_en_in_st aeis + where aeis.state_id = cfsm.current_state + and aeis.action_id = a2.action_id + and aeis.assigned_p = 't' + ) + ) + and cfsm2.case_id = cas2.case_id + and crpm2.case_id = cas2.case_id + and crpm2.role_id = a2.assigned_role + and crpm2.party_id = :filter_enabled_action_assignee + ) + } + if { $filter_enabled_action_assignee == [ad_conn user_id] } { + append human_readable_filter " awaiting action by me" + } else { + array set person [person::get -person_id $filter_enabled_action_assignee] + + append human_readable_filter " awaiting action by $person(first_names) $person(last_name)" + } + } if { ![empty_string_p [conn component_id]] } { set filter_component_id [conn component_id]