Bug 23514 - Call numbers are not splitted in Label Creator with layout types other than Biblio
Summary: Call numbers are not splitted in Label Creator with layout types other than B...
Status: Pushed to oldstable
Alias: None
Product: Koha
Classification: Unclassified
Component: Label/patron card printing (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Theodoros Theodoropoulos
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-08-28 10:03 UTC by Theodoros Theodoropoulos
Modified: 2020-05-11 22:32 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:
20.05.00, 19.11.06, 19.05.11


Attachments
Allow Splitting of Call Numbers for all layout types (apart from BAR) (1020 bytes, patch)
2019-08-28 10:26 UTC, Theodoros Theodoropoulos
Details | Diff | Splinter Review
Allow Splitting of Call Numbers for all layout types (apart from BAR) - based on master (1.07 KB, patch)
2019-08-28 10:35 UTC, Theodoros Theodoropoulos
Details | Diff | Splinter Review
Bug 23514: Split Call Numbers for all layout types (2.53 KB, patch)
2020-04-08 07:24 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23514: Split Call Numbers for all layout types (2.60 KB, patch)
2020-04-08 10:45 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Theodoros Theodoropoulos 2019-08-28 10:03:04 UTC
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)
Comment 1 Theodoros Theodoropoulos 2019-08-28 10:26:55 UTC
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
Comment 2 Theodoros Theodoropoulos 2019-08-28 10:35:22 UTC
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.
Comment 3 Theodoros Theodoropoulos 2019-08-28 10:56:36 UTC
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)
Comment 4 Katrin Fischer 2019-09-08 19:26:46 UTC
Hi Theodoros, is this ready for testing? Then you should switch this to "Needs Signoff"!
Comment 5 Theodoros Theodoropoulos 2019-09-09 05:20:30 UTC
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.
Comment 6 Martin Renvoize 2020-04-08 07:24:48 UTC
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>
Comment 7 Martin Renvoize 2020-04-08 07:25:55 UTC
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.
Comment 8 Jonathan Druart 2020-04-08 10:45:09 UTC
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>
Comment 9 Martin Renvoize 2020-04-14 07:36:44 UTC
Nice work everyone!

Pushed to master for 20.05
Comment 10 Joy Nelson 2020-05-04 20:57:54 UTC
backported to 19.11.x for 19.11.06
Comment 11 Lucas Gass 2020-05-11 22:32:24 UTC
backported to 19.05.x for 19.05.11