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.18 -r1.19 --- openacs-4/packages/bug-tracker/tcl/bug-tracker-procs.tcl 5 Mar 2003 17:40:50 -0000 1.18 +++ openacs-4/packages/bug-tracker/tcl/bug-tracker-procs.tcl 28 Aug 2003 09:45:29 -0000 1.19 @@ -4,7 +4,7 @@ @creation-date 2002-05-03 @author Lars Pind - @cvs-id $Id$ + @cvs-id bug-tracker-procs.tcl,v 1.13.2.7 2003/03/05 18:13:39 lars Exp } @@ -959,7 +959,6 @@ {-comment:required} {-format:required} } { - ns_log Notice "LARS: Format=$format, comment=$comment, formatted = [ad_html_text_convert -from $format -to text/html -- $comment]" return [ad_html_text_convert -from $format -to text/html -- $comment] } @@ -1276,6 +1275,7 @@ {action_id} fix_for_version:integer assignee:integer + enabled_action_assignee:integer action_id:integer component_id:integer keyword:integer,multiple @@ -1382,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]