summaryrefslogtreecommitdiffstats
path: root/Bugzilla.pm
diff options
context:
space:
mode:
authorSimon Green <sgreen+mozilla@redhat.com>2012-10-12 21:55:32 +0200
committerFrédéric Buclin <LpSolit@gmail.com>2012-10-12 21:55:32 +0200
commitbdbea0ef742a3badba8e8b7d9f0486ec57e212f6 (patch)
tree04975ea2011fce08e6d7e36e9c26d2115368fd14 /Bugzilla.pm
parent73958ee239e7c28d394bdbd37081cfaa7c1bc7ed (diff)
downloadbugzilla-bdbea0ef742a3badba8e8b7d9f0486ec57e212f6.tar.gz
bugzilla-bdbea0ef742a3badba8e8b7d9f0486ec57e212f6.tar.xz
Bug 790129: Bugzilla->fields returns fields in random order (the sortkey is ignored)
r/a=LpSolit
Diffstat (limited to 'Bugzilla.pm')
-rw-r--r--Bugzilla.pm5
1 files changed, 3 insertions, 2 deletions
diff --git a/Bugzilla.pm b/Bugzilla.pm
index 84e3f3ab8..504472843 100644
--- a/Bugzilla.pm
+++ b/Bugzilla.pm
@@ -592,7 +592,8 @@ sub fields {
}
}
- return $do_by_name ? \%requested : [values %requested];
+ return $do_by_name ? \%requested
+ : [sort { $a->sortkey <=> $b->sortkey || $a->name cmp $b->name } values %requested];
}
sub active_custom_fields {
@@ -856,7 +857,7 @@ in a hashref:
=item C<by_name>
If false (or not specified), this method will return an arrayref of
-the requested fields. The order of the returned fields is random.
+the requested fields.
If true, this method will return a hashref of fields, where the keys
are field names and the valules are L<Bugzilla::Field> objects.