Index: openacs-4/packages/bug-tracker/tcl/bug-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/tcl/bug-procs.tcl,v diff -u -r1.21.2.1 -r1.21.2.2 --- openacs-4/packages/bug-tracker/tcl/bug-procs.tcl 26 Aug 2005 13:16:18 -0000 1.21.2.1 +++ openacs-4/packages/bug-tracker/tcl/bug-procs.tcl 13 Nov 2006 02:24:39 -0000 1.21.2.2 @@ -828,7 +828,19 @@ orderby_desc {heading desc, bug_number desc} \ orderby_asc {heading asc, bug_number asc}] } - + + set component_keyword_id [bug_tracker::get_component_keyword -package_id $package_id] + + set distributions [db_list_of_lists get_distributions {}] + + if {[llength distributions] > 0} { + lappend filters f_distribution \ + [list \ + label Distributions \ + values $distributions \ + where_clause "b.component_id in (select bkcm.component_id from cr_keywords ck, bt_keyword_component_map bkcm where ck.parent_id = :f_distribution and ck.keyword_id = bkcm.keyword_id)"] + } + if { [bug_tracker::versions_p] } { lappend filters f_fix_for_version { label "[_ bug-tracker.Fix]" @@ -839,14 +851,14 @@ } } - foreach action_id [workflow::get_actions -workflow_id $workflow_id] { - array unset action - workflow::action::get -action_id $action_id -array action + foreach action_id [workflow::get_actions -workflow_id $workflow_id] { + array unset action + workflow::action::get -action_id $action_id -array action - set values [bug_tracker::assignee_get_filter_data \ - -package_id $package_id \ - -workflow_id $workflow_id \ - -action_id $action_id] + set values [bug_tracker::assignee_get_filter_data \ + -package_id $package_id \ + -workflow_id $workflow_id \ + -action_id $action_id] lappend filters f_action_$action_id \ [list \ Index: openacs-4/packages/bug-tracker/tcl/bug-procs.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/tcl/bug-procs.xql,v diff -u -r1.5.2.1 -r1.5.2.2 --- openacs-4/packages/bug-tracker/tcl/bug-procs.xql 1 Dec 2005 13:25:33 -0000 1.5.2.1 +++ openacs-4/packages/bug-tracker/tcl/bug-procs.xql 13 Nov 2006 02:24:39 -0000 1.5.2.2 @@ -104,5 +104,22 @@ + + + select k.heading, k.keyword_id, + (select count(*) + from bt_bugs b + where b.component_id in + (select cm.component_id + from bt_keyword_component_map cm + where cm.keyword_id in + (select kk.keyword_id + from cr_keywords kk + where kk.parent_id = k.keyword_id))) as num_bugs + from cr_keywords k + where k.parent_id = :component_keyword_id + + +