Open Bug 947707 Opened 11 years ago Updated 8 years ago

Fields are sorted pseudo-randomly by default

Categories

(Bugzilla :: Bugzilla-General, defect)

defect
Not set
minor

Tracking

()

People

(Reporter: LpSolit, Unassigned)

References

Details

By default, Bugzilla->fields sorts fields using their sortkey, but the sortkey (except for custom fields where the admin can choose the sortkey when creating them) is generated automatically based on the list from Bugzilla::Field::DEFAULT_FIELDS. Each new field gets the sortkey = previous_sortkey + 100. But when a new hardcoded field is added to that list (such as see_also, tag and comment_tag), they are simply added at the end of the list and so the sortkey has no special meaning, which can lead to weird sorting such as having the target milestone placed between the attachment creator and the bug creation date.

So either we should sort that list to look a bit more logical (this would only affect new installations; this won't affect existing installations), or we should stop wasting CPU to sort fields based on their sortkey by default.

IMO, all hardcoded fields should have sortkey = 0 *or* the list should be sorted logically.

Note that in bugmails, the list of fields displayed when creating a new bug is based on the sortkey. I think that's the single place where the sortkey matters (except for custom fields in bug reports). Everywhere else, the caller sorts the list itself based on the name or the description, making the sortkey very useless.
See Also: → 781114
You need to log in before you can comment on or make changes to this bug.