[Koha-bugs] [Bug 19915] Inventory tool doesn't use cn_sort for callnumber ranges

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Sun Jun 14 22:25:05 CEST 2020


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19915

--- Comment #60 from Eric Phetteplace <ephetteplace at cca.edu> ---
Perhaps this is a problem with cn_sort itself or something else but I've
noticed that our inventory _still_ doesn't sort correctly. Here is an example
for one of our locations with call numbers B0 - B30:

- B 29 V55 1998
- B29 .C55 2008
- B29 .L24 1983
- B29 .L264 1998
- B29 .P666 2004

I've had a JS hack in place, originally for addressing this bug, but I've never
been able to remove it because of problems like the above. This is the correct
sort after the hack is applied:

- B29 .C55 2008
- B29 .L24 1983
- B29 .L264 1998
- B29 .P666 2004
- B 29 V55 1998

It's also what I see if I run a query like

SELECT itemnumber, cn_sort, itemcallnumber
FROM items
WHERE homebranch = 'OAK'
AND items.itemcallnumber LIKE 'B29%'
OR items.itemcallnumber LIKE 'B%29%'
OR items.itemcallnumber LIKE ' B29%'
OR items.itemcallnumber LIKE ' B%29%'
ORDER BY cn_sort

itemnumber      cn_sort itemcallnumber
72613   B0029 C55 02008 B29 .C55 2008
59337   B0029 L24 01983 B29 .L24 1983
69756   B0029 L264 01998        B29 .L264 1998
65867   B0029 P666 02004        B29 .P666 2004
40918   B0029 V55 01998 B 29 V55 1998

Why is my report sorted correctly, but not the inventory page? It leads me to
believe that the inventory page isn't really sorting by cn_sort.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list