Bug 33694 - Incorrect sorting of call numbers in shelf browser
Summary: Incorrect sorting of call numbers in shelf browser
Status: CLOSED INVALID
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: 22.05
Hardware: Other Linux
: P5 - low minor
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-05-08 10:08 UTC by Anke Bruns
Modified: 2023-12-28 20:43 UTC (History)
0 users

See Also:
GIT URL:
Initiative type: ---
Sponsorship status: ---
Comma delimited list of Sponsors:
Crowdfunding goal: 0
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Anke Bruns 2023-05-08 10:08:15 UTC
(Not sure if this is related to Bug #14907)

In the view of a record in OPAC, there is a link "Browse Shelf" next to the call number in the item information.

The surrounding records displayed are sorted by their call number but not correctly, e.g. 2 comes after 19, and 16 after 159, whereas it should sort numerically like this: 2 - 19 and 16 - 159.
Comment 1 Katrin Fischer 2023-05-08 11:01:00 UTC
Just to check: does the sorting work ok for you in other places? For example the inventory list?

You could also try a report like this:

select cn_source, cn_sort, itemcallnumber from items order by cn_sort

This should reflect how Koha thinks the callnumbers should be sorted.
Comment 2 Anke Bruns 2023-05-08 11:13:52 UTC
With the SQL query, I get results sorted in the same (numerically incorrect) way as described.
Comment 3 Katrin Fischer 2023-05-08 15:50:38 UTC
I don't believe it's a bug then, it's a configuration issue.

Koha will generate a sorting form of your callnumber (itemcallnumber) from the classification source (cn_source). It's saved to cn_sort and used in a lot of places for sorting callnumbers.

If you check the manual for classification sources, you'll find information there about the 3 algorithms Koha has to do that (DDC, LOC and generic).

Sadly no RVK and similar yet (I'd be happy to see that added :) )