Page MenuHomePhabricator

Make table sorting ignore refs when determining data type
Closed, DuplicatePublic

Description

table sorting = class="sortable" in tables. wikibits.js
refs = [1], [2] etc. generated with <ref>1</ref>
data type = text, date, number etc.


Version: 1.17.x
Severity: enhancement

Details

Reference
bz24523

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:05 PM
bzimport set Reference to bz24523.
bzimport added a subscriber: Unknown Object (MLST).

Is this really an issue? Normally [1] comes after any other text, and thus doesn't affect the sorting order

Sounds like it's doing things like interpreting "123[1]" as 'string' instead of 'number'; this would indeed affect the sort order if the rest of your column consists of numbers.

This table seems to sort ok though: http://en.wikipedia.org/wiki/User:Brion_VIBBER/24523

(In reply to comment #2)

This table seems to sort ok though:
http://en.wikipedia.org/wiki/User:Brion_VIBBER/24523

But it would break for sure if it contained more complex "numbers" like dates etc.
Not sure though how to fix it. We could duplicate jQuery text function and include a sup.reference check in it

(In reply to comment #2)

This table seems to sort ok though:
http://en.wikipedia.org/wiki/User:Brion_VIBBER/24523

That table no longer sorts correctly. It is sorting alphabetically. There needs to be a way to force a column to sort numerically. Something in the table header.

diebuche wrote:

Is this really an issue? Normally [1] comes after any other text, and thus doesn't affect the sorting order

Please see this discussion on why the issue also negatively affects text fields.