Wrong sorting in changelog window of field

Description

If you right-click a field and open the changelog for this field, the entries are sorted by their updated date. The order is correct since the sql to load the entries use "order by updated desc". However, if you click on one of the column headers the sorting gets broken.
A good example is in number fields. the sorting is 22,123,0 because in FieldRecordInfo.java, everything is casted to String. Then in MSort, the string is compared and of course "22" is before "123" because 2 is greater than 1.

There are some possible fixes. We could create a custom TableCellRender in FieldRecordInfo and instead of formatting the columns to strings, we could let the cellrenderer decide how to display a column.
Another way could be to change the MSort class and check if it would be possible to cast a String to a number or a timestamp and use another compare but i think this would affect every sorting of strings through the whole application. A third way could be to change V/CTable a little bit and add a custom cellrenderer there but i believe number 1 would be the best solution.

What do you think? Is this worth developing?

Environment

None

Activity

Show:

Carlos Ruiz July 27, 2018 at 4:02 PM

Closing as lack of interest from community

Jan Thielemann September 23, 2014 at 9:26 AM
Edited

Same problem if you click in the bottom right corner in a table ("x/xx") (swing client)

Incomplete

Details

Assignee

Reporter

Priority

Created September 23, 2014 at 9:24 AM
Updated September 1, 2018 at 11:01 AM
Resolved July 27, 2018 at 4:02 PM