In Label Creator, - when one chooses any "Layout type" OTHER THAN Biblio - AND "Split call numbers" IS checked the splitting does not work at all, regardless of the classification standard used. Indeed in Label.pm, the splitting functions are applied only when printing_type=BIB I think this is a residue from the past and should be removed (or altered to exclude printing_type=BAR)
Created attachment 92486 [details] [review] Allow Splitting of Call Numbers for all layout types (apart from BAR) Allow the execution of call number splitting routines for all label layout types apart from Barcodes. This code is based on 17.11 code, similar code is used in master
Created attachment 92487 [details] [review] Allow Splitting of Call Numbers for all layout types (apart from BAR) - based on master Allow Splitting of Call Numbers for all layout types (apart from BAR) Allow the execution of call number splitting routines for all label layout types apart from Barcodes. This patch is based on master code.
Test plan: 1- Go to Label Creator and choose/create a Label Layout with "Choose layout type: Biblio" 2- make sure you have at least "itemcallnumber" in Bibliographic data to print/Data fields 3- check "Split call numbers" box and save the layout (ie testlayout) 4- create a label batch, using items that have a call number (ie DC611.B848 H84 1997). LCC is used here, but you may try with Dewey as well. 5- export selected batch using any template and the layout you created in previous step to a PDF 6- Call numbers are splitted (as expected) in the resulting PDF file 7- edit the layout you created in the previous step (ie testlayout) and change the "Choose layout type:" to either Biblio/Barcode (BIBBAR) or Barcode/Biblio (BARBIB) 8- export the same batch using the same template and layout as before 9- Call numbers are NOT splitted at all After patch is applied, call numbers splitting functions are applied even in Biblio/Barcode (BIBBAR) or Barcode/Biblio (BARBIB) layout types. (in Barcode type, there is no need to even try to split any call number)
Hi Theodoros, is this ready for testing? Then you should switch this to "Needs Signoff"!
Thanks Katrin, I forgot to change the status :) Make sure to use the patch named "Allow Splitting of Call Numbers for all layout types (apart from BAR) - based on master" when testing on master. ps. I could include screenshots of the labels before and after the patch, but it would provide little additional information.
Created attachment 102531 [details] [review] Bug 23514: Split Call Numbers for all layout types This patch ensures call numbers are properly split for layout types other than 'BAR'. Test plan: 1. Go to Label Creator and choose/create a Label Layout with "Choose layout type: Biblio" 2. make sure you have at least "itemcallnumber" in Bibliographic data to print/Data fields 3. check "Split call numbers" box and save the layout (ie testlayout) 4. create a label batch, using items that have a call number (ie DC611.B848 H84 1997). LCC is used here, but you may try with Dewey as well. 5. export selected batch using any template and the layout you created in previous step to a PDF 6. Call numbers are splitted (as expected) in the resulting PDF file 7. edit the layout you created in the previous step (ie testlayout) and change the "Choose layout type:" to either Biblio/Barcode (BIBBAR) or Barcode/Biblio (BARBIB) 8. export the same batch using the same template and layout as before 9. Call numbers are NOT splitted at all After patch is applied, call numbers splitting functions are applied even in Biblio/Barcode (BIBBAR) or Barcode/Biblio (BARBIB) layout types. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Works as expected and the code is clear.. signing off. I've also converted the basic patch to a mailbox patch to allow proper functioning with git bz to allow easier testing.
Created attachment 102552 [details] [review] Bug 23514: Split Call Numbers for all layout types This patch ensures call numbers are properly split for layout types other than 'BAR'. Test plan: 1. Go to Label Creator and choose/create a Label Layout with "Choose layout type: Biblio" 2. make sure you have at least "itemcallnumber" in Bibliographic data to print/Data fields 3. check "Split call numbers" box and save the layout (ie testlayout) 4. create a label batch, using items that have a call number (ie DC611.B848 H84 1997). LCC is used here, but you may try with Dewey as well. 5. export selected batch using any template and the layout you created in previous step to a PDF 6. Call numbers are splitted (as expected) in the resulting PDF file 7. edit the layout you created in the previous step (ie testlayout) and change the "Choose layout type:" to either Biblio/Barcode (BIBBAR) or Barcode/Biblio (BARBIB) 8. export the same batch using the same template and layout as before 9. Call numbers are NOT splitted at all After patch is applied, call numbers splitting functions are applied even in Biblio/Barcode (BIBBAR) or Barcode/Biblio (BARBIB) layout types. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Nice work everyone! Pushed to master for 20.05
backported to 19.11.x for 19.11.06
backported to 19.05.x for 19.05.11