Index: openacs-4/packages/bug-tracker/lib/nav-bar.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/lib/nav-bar.tcl,v diff -u -r1.8 -r1.9 --- openacs-4/packages/bug-tracker/lib/nav-bar.tcl 24 Sep 2003 15:14:10 -0000 1.8 +++ openacs-4/packages/bug-tracker/lib/nav-bar.tcl 26 Sep 2003 08:10:35 -0000 1.9 @@ -61,7 +61,7 @@ } if { $patches_p } { - multirow append links "Patches" "[ad_conn package_url]patch-list" + multirow append links "Patches" [export_vars -no_empty -base "[ad_conn package_url]patch-list" { { status open } { apply_to_version {[bug_tracker::conn current_version_id]} } }] if { $create_p } { multirow append links "New Patch" "[ad_conn package_url]patch-add" Index: openacs-4/packages/bug-tracker/www/patch-list-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/www/patch-list-oracle.xql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/bug-tracker/www/patch-list-oracle.xql 26 Sep 2003 06:40:22 -0000 1.1 +++ openacs-4/packages/bug-tracker/www/patch-list-oracle.xql 26 Sep 2003 08:10:36 -0000 1.2 @@ -20,4 +20,20 @@ + + + + select v.version_name, + p.apply_to_version, + count(p.patch_id) as num_patches + from bt_patches p, + bt_versions v + where p.project_id = :package_id + and v.version_id (+) = p.apply_to_version + group by v.version_name, v.anticipated_freeze_date, p.apply_to_version + order by v.anticipated_freeze_date, v.version_name + + + + Index: openacs-4/packages/bug-tracker/www/patch-list-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/www/patch-list-postgresql.xql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/bug-tracker/www/patch-list-postgresql.xql 26 Sep 2003 06:40:22 -0000 1.1 +++ openacs-4/packages/bug-tracker/www/patch-list-postgresql.xql 26 Sep 2003 08:10:36 -0000 1.2 @@ -20,5 +20,23 @@ + + + select v.version_name, + v.version_id, + (select count(*) + from bt_patches p + where p.project_id = :package_id + and p.apply_to_version = v.version_id + ) as count + from bt_versions v + where exists (select 1 from bt_patches p2 + where p2.apply_to_version = v.version_id) + order by v.version_name + + + + + Index: openacs-4/packages/bug-tracker/www/patch-list.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/www/patch-list.tcl,v diff -u -r1.5 -r1.6 --- openacs-4/packages/bug-tracker/www/patch-list.tcl 26 Sep 2003 06:40:22 -0000 1.5 +++ openacs-4/packages/bug-tracker/www/patch-list.tcl 26 Sep 2003 08:10:36 -0000 1.6 @@ -59,6 +59,8 @@ label "Apply to version" values {[db_list_of_lists select_versions {}]} where_clause {[db_map apply_to_version_where_clause]} + null_where_clause {[db_map apply_to_version_null_where_clause]} + null_label {Undecided} } component_id { label "Component" Index: openacs-4/packages/bug-tracker/www/patch-list.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/www/patch-list.xql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/bug-tracker/www/patch-list.xql 26 Sep 2003 06:40:22 -0000 1.1 +++ openacs-4/packages/bug-tracker/www/patch-list.xql 26 Sep 2003 08:10:36 -0000 1.2 @@ -7,27 +7,15 @@ - + - - select v.version_name, - v.version_id, - (select count(*) - from bt_patches p - where p.project_id = :package_id - and p.apply_to_version = v.version_id - ) as count - from bt_versions v - where exists (select 1 from bt_patches p2 - where p2.apply_to_version = v.version_id) - order by v.version_name - + bt_patches.apply_to_version = :apply_to_version - + - + - bt_patches.apply_to_version = :apply_to_version + bt_patches.apply_to_version is null