Custom column sorting bug in 8.01 final

Please report only one bug per message!

Moderators: white, Hacker, petermad, Stefan2

Post Reply
Zom-B
Junior Member
Junior Member
Posts: 36
Joined: 2006-11-20, 17:46 UTC

Custom column sorting bug in 8.01 final

Post by *Zom-B »

When a column contains a combination of or a range of a variable, it inaccurately sorts by the actual and full value of the first variable encountered and not by the textual result.

[img]http://i.imgur.com/uE34yFBs.png[/img]

Steps to reproduce:
1. Create new column in custom columns view containing just [face=courier][=tc.name:8-][/face]
2. Sort by that column

Other examples (not all useful) of field contents that sort wrongly:
[face=courier]a[=tc.fullname:9-][/face] (sorts by Name)
[face=courier][=tc.size.bkM:-3-][/face] (sorts by Size)
[face=courier]b[=tc.fullname:9-][=tc.size.bkM:-3-][/face] (sorts by Name)
[face=courier]b[=tc.size.bkM:-3-][=tc.fullname:9-][/face] (sorts by Size)
User avatar
Hacker
Moderator
Moderator
Posts: 13052
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Post by *Hacker »

Zom-B,
Yes, that is a known and unfortunate limitation. I support sorting according to the shown value.
[Sugg] Sorting only according to shown values

Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Unfortunately sorting by the displayed text instead of the actual value would lead to incorrect results in many cases, e.g.
- Date fields like [=tc.writedate.D.M.Y h:m:s] would sort by day, then by month, then by year, instead of sorting by year first.
- Size fields like [=tc.size.bkM2] would sort incorrectly, because the unit at the end would not be taken into account.
Author of Total Commander
https://www.ghisler.com
User avatar
Hacker
Moderator
Moderator
Posts: 13052
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Post by *Hacker »

Christian,
That is the reason why there should be an internal command to toggle the behavior.

Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
Zom-B
Junior Member
Junior Member
Posts: 36
Joined: 2006-11-20, 17:46 UTC

Post by *Zom-B »

ghisler(Author) wrote:Unfortunately sorting by the displayed text instead of the actual value would lead to incorrect results in many cases, e.g.
- Date fields like [=tc.writedate.D.M.Y h:m:s] would sort by day, then by month, then by year, instead of sorting by year first.
- Size fields like [=tc.size.bkM2] would sort incorrectly, because the unit at the end would not be taken into account.
Alternatively, make it so it ONLY sorts by shown value when letter ranges are used.

[face=courier][=tc.writedate.D.M.Y h:m:s][/face] sorts by actual value
[face=courier][=tc.writedate.D.M.Y h:m:s:7-10][/face] sorts by displayed value

If no letter range is wished, but still sort by displayed value, use a dummy range:

[face=courier][=tc.writedate.D.M.Y h:m:s:1-][/face]
Post Reply