Summary: | List sort on call number does not use cn_sort | ||
---|---|---|---|
Product: | Koha | Reporter: | Myka Kennedy Stephens <mkstephens> |
Component: | Lists | Assignee: | Jonathan Druart <jonathan.druart> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | normal | ||
Priority: | P5 - low | CC: | fridolin.somers, jonathan.druart, m.de.rooy, martin.renvoize, nick, sandboxes |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
See Also: | https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19915 | ||
Change sponsored?: | --- | Patch complexity: | Trivial patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: |
With this patch lists sorted on call number will now use the machine sortable form of the callnumber from items.cn_sort for better results.
|
Version(s) released in: | |
Circulation function: | |||
Attachments: |
Bug 21629: Use cn_sort instead of itemcallnumber when displaying a list
Bug 21629: Use cn_sort instead of itemcallnumber when displaying a list Bug 21629: Use cn_sort instead of itemcallnumber when displaying a list |
Description
Myka Kennedy Stephens
2018-10-22 15:31:07 UTC
This sounds more like an enhancement request. The sort is done by the DBMS (MySQL/MariaDB) and it will not be trivial to make it sort the results according to the cn_sort. Why would it not be trivial? It would be just a different column to use? (it's also a sort with SQL) Created attachment 80990 [details] [review] Bug 21629: Use cn_sort instead of itemcallnumber when displaying a list DBMS can sort callnumbers correctly using cn_sort. We should use it showing a list's content. Test plan: - Add items with callnumber to a list - Display the list - List the content by callnumbers => Confirm that the records are correctly sorted by callnumber (In reply to Katrin Fischer from comment #2) > Why would it not be trivial? It would be just a different column to use? > (it's also a sort with SQL) Indeed, I was thinking about something else! Patch tested with a sandbox, by Myka Kennedy Stephens <mkstephens@lancasterseminary.edu> Created attachment 81000 [details] [review] Bug 21629: Use cn_sort instead of itemcallnumber when displaying a list DBMS can sort callnumbers correctly using cn_sort. We should use it showing a list's content. Test plan: - Add items with callnumber to a list - Display the list - List the content by callnumbers => Confirm that the records are correctly sorted by callnumber Signed-off-by: Myka Kennedy Stephens <mkstephens@lancasterseminary.edu> I can confirm that the patch applied to a sandbox sorted a list by call number correctly. I imported some MARC records from my library's catalog into the sandbox that are not sorting correctly in 18.05. They did sort correctly in the sandbox. Yay! Thank you for writing the patch so quickly!! Myka Thank you Myka for testing! Created attachment 81292 [details] [review] Bug 21629: Use cn_sort instead of itemcallnumber when displaying a list DBMS can sort callnumbers correctly using cn_sort. We should use it showing a list's content. Test plan: - Add items with callnumber to a list - Display the list - List the content by callnumbers => Confirm that the records are correctly sorted by callnumber Signed-off-by: Myka Kennedy Stephens <mkstephens@lancasterseminary.edu> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Awesome work all! Pushed to master for 18.11 Pushed to 18.05.x for 18.05.06. I prefer to not push to 17.11.x. In case cn_sort calculation is not well configured. I bet it will be better validated during a major version upgrade. |