Commit 22212e51 authored by bugreport%peshkin.net's avatar bugreport%peshkin.net

Bug 313008 Lists of products, milestones, etc... should be sorted

Patch by Joel Peshkin <bugreport@peshkin.net> r=lpsolit, a=justdave
parent 89222752
...@@ -100,7 +100,8 @@ sub products { ...@@ -100,7 +100,8 @@ sub products {
if (!$self->{'products'}) { if (!$self->{'products'}) {
my $product_ids = $dbh->selectcol_arrayref(q{ my $product_ids = $dbh->selectcol_arrayref(q{
SELECT id FROM products SELECT id FROM products
WHERE classification_id = ?}, undef, $self->id); WHERE classification_id = ?
ORDER BY name}, undef, $self->id);
my @products; my @products;
foreach my $product_id (@$product_ids) { foreach my $product_id (@$product_ids) {
......
...@@ -100,7 +100,8 @@ sub components { ...@@ -100,7 +100,8 @@ sub components {
if (!defined $self->{components}) { if (!defined $self->{components}) {
my $ids = $dbh->selectcol_arrayref(q{ my $ids = $dbh->selectcol_arrayref(q{
SELECT id FROM components SELECT id FROM components
WHERE product_id = ?}, undef, $self->id); WHERE product_id = ?
ORDER BY name}, undef, $self->id);
my @components; my @components;
foreach my $id (@$ids) { foreach my $id (@$ids) {
...@@ -145,7 +146,8 @@ sub versions { ...@@ -145,7 +146,8 @@ sub versions {
if (!defined $self->{versions}) { if (!defined $self->{versions}) {
my $values = $dbh->selectcol_arrayref(q{ my $values = $dbh->selectcol_arrayref(q{
SELECT value FROM versions SELECT value FROM versions
WHERE product_id = ?}, undef, $self->id); WHERE product_id = ?
ORDER BY value}, undef, $self->id);
my @versions; my @versions;
foreach my $value (@$values) { foreach my $value (@$values) {
...@@ -163,7 +165,8 @@ sub milestones { ...@@ -163,7 +165,8 @@ sub milestones {
if (!defined $self->{milestones}) { if (!defined $self->{milestones}) {
my $values = $dbh->selectcol_arrayref(q{ my $values = $dbh->selectcol_arrayref(q{
SELECT value FROM milestones SELECT value FROM milestones
WHERE product_id = ?}, undef, $self->id); WHERE product_id = ?
ORDER BY sortkey}, undef, $self->id);
my @milestones; my @milestones;
foreach my $value (@$values) { foreach my $value (@$values) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment