To replicate: Find items which are on the same shelf in using the opac shelf browser, but whose items.itemcallnumber do not sort the same way alphanumerically. Edit one of the items, click on the elipses ( ... ) next to itemcallnumber in the edit items screen. This will bring up a 'Call numbers browser' screen. These will not be sorted the same way that they are sorted in the opac shelf browser.
Need to model changes here on https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19915 Once that is PQA I will work on this one
To clarify, in a system with mixed classification sources the callnumber browser uses the DefaultClassificationSource defined in the sysprefs for all browsing. This is problematic in some situations, for instance: '2017 SCHM' is a generic callnumber, if you set the Default to 'LOC' you get back a blank string To recreate: 1 - Set DefaultClassificationSource to LOC 2 - perl -e "use C4::ClassSource; print GetClassSort( undef, undef, '2017 SCHM' );" 3 - You get no feedback 4 - Set DefaultClass.. to Dewey 5 - repeat #2 6 - You get a populated string
Created attachment 98531 [details] [review] Bug 18499: Use items cn_source in cn_browser.pl This does a few things: * We fetch the cn_sort from the DB and use this rather than calculating based on DefaultClassificationSource We were already pulling based on the items source, so this should not change things * Rather than using JS to submit the form, it submits via html * Fix subtitle display and add barcode (it was retrieved in one query but not used) * Add option to apply different classification scheme to the search To test: 1 - Add cn_browser.pl to the 'plugin' field in a framework for 952$o 2 - Edit an item on a record in that framework 3 - Enter an itemcallnumber 4 - Click the two dots to launch the callnumber browser 5 - Note the results 6 - Apply patch 7 - Repeat 8 - Note subtitles and barcodes are displayed in results 9 - Note callnumbers are appropriate 10 - Try changing the class source used 11 - Try this with differing dewey,lcc, and other callnumbers 12 - Ensure results are as expected
Created attachment 98737 [details] [review] Bug 18499: Use items cn_source in cn_browser.pl This does a few things: * We fetch the cn_sort from the DB and use this rather than calculating based on DefaultClassificationSource We were already pulling based on the items source, so this should not change things * Rather than using JS to submit the form, it submits via html * Fix subtitle display and add barcode (it was retrieved in one query but not used) * Add option to apply different classification scheme to the search To test: 1 - Add cn_browser.pl to the 'plugin' field in a framework for 952$o 2 - Edit an item on a record in that framework 3 - Enter an itemcallnumber 4 - Click the two dots to launch the callnumber browser 5 - Note the results 6 - Apply patch 7 - Repeat 8 - Note subtitles and barcodes are displayed in results 9 - Note callnumbers are appropriate 10 - Try changing the class source used 11 - Try this with differing dewey,lcc, and other callnumbers 12 - Ensure results are as expected Signed-off-by: Myka Kennedy Stephens <mkstephens@lancasterseminary.edu>
This patch works as expected. I tested with Dewey, LC, and home-grown alpha-numeric call numbers using the 'z Other/Generic classification scheme' and the results were all as expected. I wish I had a larger database of call numbers to test this with to be 100% certain, but from what I could test in the test database it works great and looks like a huge improvement on the current call number browser. Thank you for your great work!
Sorry, Nick: FAIL koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/cn_browser.tt FAIL filters missing_filter at line 23 ( <input name="popup" type="hidden" value="[% popup %]"/>) missing_filter at line 55 ( [% IF ( cn_loo.barcode ) %] ([% cn_loo.barcode %])[% END %])
Created attachment 99000 [details] [review] Bug 18499: (follow-up) Add missing filters
Created attachment 99057 [details] [review] Bug 18499: Use items cn_source in cn_browser.pl This does a few things: * We fetch the cn_sort from the DB and use this rather than calculating based on DefaultClassificationSource We were already pulling based on the items source, so this should not change things * Rather than using JS to submit the form, it submits via html * Fix subtitle display and add barcode (it was retrieved in one query but not used) * Add option to apply different classification scheme to the search To test: 1 - Add cn_browser.pl to the 'plugin' field in a framework for 952$o 2 - Edit an item on a record in that framework 3 - Enter an itemcallnumber 4 - Click the two dots to launch the callnumber browser 5 - Note the results 6 - Apply patch 7 - Repeat 8 - Note subtitles and barcodes are displayed in results 9 - Note callnumbers are appropriate 10 - Try changing the class source used 11 - Try this with differing dewey,lcc, and other callnumbers 12 - Ensure results are as expected Signed-off-by: Myka Kennedy Stephens <mkstephens@lancasterseminary.edu> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 99058 [details] [review] Bug 18499: (follow-up) Add missing filters Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 99059 [details] [review] Bug 18499: (QA follow-up) Add missing colon after label description To match the line above, a colon (:) was added after the description: Callnumber classification scheme: [pull down] Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Nice work everyone! Pushed to master for 20.05
Pushed to 19.11.x for 19.11.04
backported to 19.05.x for 19.05.09
Created attachment 103029 [details] [review] Bug 18499: [19.05.x only] Remove subtitle from query