TC7.03 Sort on custom column with substring of plugin value

The behaviour described in the bug report is either by design, or would be far too complex/time-consuming to be changed

Moderators: Hacker, petermad, Stefan2, white

Post Reply
User avatar
white
Power Member
Power Member
Posts: 5747
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

TC7.03 Sort on custom column with substring of plugin value

Post by *white »

Suppose you have a custom column like this:
[=tc.name:2]

Sorting on this column will sort on the whole name and not on the second character of the name.
User avatar
Hacker
Moderator
Moderator
Posts: 13141
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Post by *Hacker »

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: 50390
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

I have considered this, but it would break the sorting by numeric values like size or date/time...
Author of Total Commander
https://www.ghisler.com
User avatar
Hacker
Moderator
Moderator
Posts: 13141
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Post by *Hacker »

Christian,
If you mean that it would sort on equal values, well, the same would happen if the values were really equal.

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
white
Power Member
Power Member
Posts: 5747
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Post by *white »

ghisler(Author) wrote:I have considered this, but it would break the sorting by numeric values like size or date/time...
When someone uses a sub string he in most cases wants to change the sort order. Maybe you can leave the sort order like it is now when field formatters are used, but change the sort order when a sub string is used.

It also makes sense considering a sub string of a number or date as a string instead of a number or date.

Another possibility is to give the user the possibility to supply a sort key. For example using the following syntax: [=pluginname.fieldname.unit|sort_key].
(Like it is done with categories in the wiki: [[Category:category_name|sort_key]])
Post Reply