summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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.