Commit bdbea0ef authored by Simon Green's avatar Simon Green Committed by Frédéric Buclin

Bug 790129: Bugzilla->fields returns fields in random order (the sortkey is ignored)

r/a=LpSolit
parent 73958ee2
......@@ -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.
......
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