Last modified: 2012-09-26 17:55:56 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 24523 - Make table sorting ignore refs when determining data type
Make table sorting ignore refs when determining data type
Status: NEW
Product: MediaWiki
Classification: Unclassified
JavaScript (Other open bugs)
All All
: Normal enhancement with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
Depends on:
  Show dependency treegraph
Reported: 2010-07-24 10:32 UTC by Liangent
Modified: 2012-09-26 17:55 UTC (History)
4 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Description Liangent 2010-07-24 10:32:02 UTC
table sorting = class="sortable" in tables. wikibits.js
refs = [1], [2] etc. generated with <ref>1</ref>
data type = text, date, number etc.
Comment 1 DieBuche 2011-05-02 19:38:25 UTC
Is this really an issue? Normally [1] comes after any other text, and thus doesn't affect the sorting order
Comment 2 Brion Vibber 2011-05-02 19:54:30 UTC
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:
Comment 3 DieBuche 2011-05-02 23:07:51 UTC
(In reply to comment #2)
> This table seems to sort ok though:

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
Comment 4 Timeshifter 2012-09-26 17:55:56 UTC
(In reply to comment #2)
> This table seems to sort ok though:

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.

Note You need to log in before you can comment on or make changes to this bug.