[Koha-devel] Should the first 3 digits of cn_sort be sorted for dewey decimal?

Barton Chittenden barton at bywatersolutions.com
Sat Jun 16 03:31:55 CEST 2018


The documentation for GetClassSortKey says

* Concatenates class and item part.
* Converts to uppercase.
* Removes leading and trailing whitespace and '/'
* Separates alphabetic prefix from the rest of the call number
* Splits into tokens on whitespaces and periods.
* Leaves first digit group as is.
...

this means that callnumbers

9.1 => 9_100000000000000
80.1 => 80_100000000000000
700.1 => 700_100000000000000

when sorted ascending by cn_sort

700.1 => 700_100000000000000
80.1 =>  80_100000000000000
9.1 => 9_100000000000000

Shouldn't these be zero padded to 3 digits, so that they sort as follows?

009_100000000000000
080_100000000000000
700_100000000000000
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.koha-community.org/pipermail/koha-devel/attachments/20180615/38b3a82e/attachment.html>


More information about the Koha-devel mailing list