| Seb35 added a comment. |
Related to this task, I’ve created a script to sort the values of P348 (versions of a software), see https://www.wikidata.org/wiki/User:Seb35/sortValues.js (and talk page). It could be adapted for other properties.
But it will be better if it is integrated into Wikibase, perhaps by defining in the property page a specially-recognised property 'Ordering' saying to sort either with the value of the property (with some specially-recognised item) either according to some qualifier either according to the rank. E.g. on Property:P580 we have such property to sort the values of this property directly by the values:
Ordering (PXX) = Value (QYY)
And on Property:P1087 (Elo rating) there could be a property saying to sort by P585 (date):
Ordering (PXX) = Date (P585)Defining the order in the property page allows the community to discuss what order should be prioritised: e.g. for P1087, should we sort by value or by qualifier "publication date" or by rank? The order defined by the community would be the default order, it could also be created scripts to define alternative orders for specific needs.
On the longer term:
- it could be added a specially-recognised qualifier to this property to define sub-orders: when two values are identical, the second then the third (etc) order will be used. E.g. sort by P580 (start date) then by P582 (end date),
- special collations could be added, e.g. for software versions the semantic versioning needs some special attention
- where should be sorted the special values "no value" and "unknown value"?
- should we (and how) deal with references? should we allow sorting by (e.g.) P813 publication date from the reference?
PS: in this post, to avoid P348 is intepreted by Phabricator as a link to a paste, and given I didn’t find how to avoid such behaviour in Remarkup syntax help, I used the Unicode character U+2060 (zero-width word joiner) between the P and the number. A bit hacky but it works.
Cc: Seb35, agray, thiemowmde, Lydia_Pintscher, Bencemac, Sjoerddebruin, Aklapper, Agabi10, Dinadineke, Nandana, tabish.shaikh91, Lahi, Gq86, GoranSMilovanovic, Soteriaspace, Jayprakash12345, JakeTheDeveloper, QZanden, merbst, LawExplorer, Wikidata-bugs, aude, TheDJ, Mbch331
_______________________________________________ Wikidata-bugs mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs
