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.2 -r1.2.4.1
--- openacs-4/packages/bug-tracker/www/patch-list-postgresql.xql 26 Sep 2003 08:10:36 -0000 1.2
+++ openacs-4/packages/bug-tracker/www/patch-list-postgresql.xql 23 Jan 2005 22:10:36 -0000 1.2.4.1
@@ -5,18 +5,13 @@
- select distinct upper(substring(p.status from 1 for 1)) || substring(p.status from 2),
- p.status,
- (select count(*)
- from bt_patches p2
- where p2.project_id = p.project_id
- and p2.status = p.status
- ) as count,
- (case p.status when 'open' then 1 when 'accepted' then 2 when 'refused' then 3 else 4 end) as order_num
- from bt_patches p
- where p.project_id = :package_id
- order by order_num
-
+ select upper(substring(s.status from 1 for 1)) || substring(s.status from 2), status, count,
+ (case s.status when 'open' then 1 when 'accepted' then 2 when 'refused' then 3 else 4 end) as order_num
+ from (select status, count(*) as count
+ from bt_patches p
+ where p.project_id = :package_id
+ group by p.status) s
+ order by order_num
@@ -25,14 +20,13 @@
select v.version_name,
v.version_id,
- (select count(*)
+ s.count
+ from bt_versions v,
+ (select p.apply_to_version, count(*) as 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)
+ group by p.apply_to_version) s
+ where s.apply_to_version = v.version_id
order by v.version_name
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.2 -r1.2.4.1
--- openacs-4/packages/bug-tracker/www/patch-list.xql 26 Sep 2003 08:10:36 -0000 1.2
+++ openacs-4/packages/bug-tracker/www/patch-list.xql 23 Jan 2005 22:10:36 -0000 1.2.4.1
@@ -23,16 +23,16 @@
select c.component_name,
- c.component_id,
- (select count(*)
+ c.component_id,
+ s.count
+ from bt_components c,
+ (select p.component_id, count(*) as count
from bt_patches p
- where p.project_id = :package_id
- and p.component_id = c.component_id
- ) as count
- from bt_components c
- where exists (select 1 from bt_patches p2
- where p2.component_id = c.component_id)
- order by c.component_name
+ where p.project_id = :package_id
+ group by p.component_id
+ ) s
+ where s.component_id = c.component_id
+ order by lower(c.component_name)