Sort alphabetically custom field values

Hi folks,

Is there a way to sort the values of a custom field alphabetically? For example, you have a custom field called offices and the following entries: London, Paris, Edinburgh, Brussels, Stockholm. I would like to be able to sort these alphabetically, including when a new value is added (otherwise the value is listed as the first value in a dropdown list, regardless of the values spelling).

Thank you,

Thom

RT version?
Values are sorted alphabetically in my 5.0.7/8 servers by default.

Interesting. We are using 5.0.3.

Doing some more testing I see some interesting behaviour. New values sort themselves alphabetically, but custom field values - potentially from before our upgrade to RT5 - are not sorted alphabetically. So we end up with a list of values that is split in two, with a first group of values ordered alphabetically, then another group of values ordered alphabetically, all within the same custom field dropdown.

Bit more testing. Editing an older custom field value via the GUI - either the description or value name - does not result in any change. The value remains part of the “old” group and not added to the “new” group of CF values.

Deleting and re-adding results in the value being part of the “new” group and being listed alphabetically.

No impact on tickets, from what I could see. If the old value was listed and you deleted the old value as an option in the custom field, it remained on the ticket. Moreover, if you re-added the value and searched for it, you’d get results that combine both the “old” value and the “new value”.

Which leads me to believe that values are sorted alphabetically for new values, which I guess was a change between RT 4 and 5. And that i should probably just copy, delete, then re-add the custom field values in order to get them to list alphabetically.

1 Like

Well done! I presume that looking inside the database you’ll find differences between those values, I’m sure there are other CF affected by this issue that can be corrected by a database update.

I wonder if a sort order got added to those fields during the upgrade