]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 313008 Lists of products, milestones, etc... should be sorted
authorbugreport%peshkin.net <>
Thu, 20 Oct 2005 03:04:20 +0000 (03:04 +0000)
committerbugreport%peshkin.net <>
Thu, 20 Oct 2005 03:04:20 +0000 (03:04 +0000)
Patch by Joel Peshkin <bugreport@peshkin.net>
r=lpsolit, a=justdave

Bugzilla/Classification.pm
Bugzilla/Product.pm

index fae932b8593032358e94f0da012a9d6f594bb077..e87852ba2456522026716b2369946ec1598ac632 100644 (file)
@@ -100,7 +100,8 @@ sub products {
     if (!$self->{'products'}) {
         my $product_ids = $dbh->selectcol_arrayref(q{
             SELECT id FROM products
-            WHERE classification_id = ?}, undef, $self->id);
+            WHERE classification_id = ?
+            ORDER BY name}, undef, $self->id);
  
         my @products;
         foreach my $product_id (@$product_ids) {
index f55b5dd67395f7afec9e193a4d776270b474254a..2bc9da52d9ecefad5d2f1e863c247fc0f82db4df 100644 (file)
@@ -100,7 +100,8 @@ sub components {
     if (!defined $self->{components}) {
         my $ids = $dbh->selectcol_arrayref(q{
             SELECT id FROM components
-            WHERE product_id = ?}, undef, $self->id);
+            WHERE product_id = ?
+            ORDER BY name}, undef, $self->id);
 
         my @components;
         foreach my $id (@$ids) {
@@ -145,7 +146,8 @@ sub versions {
     if (!defined $self->{versions}) {
         my $values = $dbh->selectcol_arrayref(q{
             SELECT value FROM versions
-            WHERE product_id = ?}, undef, $self->id);
+            WHERE product_id = ?
+            ORDER BY value}, undef, $self->id);
 
         my @versions;
         foreach my $value (@$values) {
@@ -163,7 +165,8 @@ sub milestones {
     if (!defined $self->{milestones}) {
         my $values = $dbh->selectcol_arrayref(q{
             SELECT value FROM milestones
-            WHERE product_id = ?}, undef, $self->id);
+            WHERE product_id = ?
+            ORDER BY sortkey}, undef, $self->id);
  
         my @milestones;
         foreach my $value (@$values) {