Bug 25897: Use cn_sort for sorting callnumbers in inventory table
authorKatrin Fischer <katrin.fischer.83@web.de>
Mon, 19 Oct 2020 00:38:31 +0000 (00:38 +0000)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Wed, 4 Nov 2020 11:59:32 +0000 (12:59 +0100)
commitb72de018132acaae77ebc3852ed369cf45edc8fb
treef98a80e2585d7e25347430bf2e874e9df6a74669
parent8ba1d7a22b2fccb093fcdb9f20b6bf2dfec04e91
Bug 25897: Use cn_sort for sorting callnumbers in inventory table

Instead of using the machine sortable form of the callnumber from
cn_sort the table was only sorting on the callnumber. This tries
to fix it using the same technique as for sorting the differently
formatted dates.

To test:
- If your database has items with suitably cataloged items, use
  these. Otherwise you could use the examples from the bug report:

- Catalog items with the following barcodes:
   B 29 V55 1998
   B29 .C55 2008
   B29 .L24 1983
   B29 .L264 1998
   B29 .P666 2004
  Make sure the LOC is selected in $2 as source of classification
  This makes sure the sortable form of the callnumber is calculated
  correctly.
- Go to inventory
- Search for your items
- Before patch, they should sort on callnumber as above, after the
  patch the correct sort order should be:
   B29 .C55 2008
   B29 .L24 1983
   B29 .L264 1998
   B29 .P666 2004
   B 29 V55 1998

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt