Bug 12064

Summary: labels that don't use the splitter print zeros
Product: Koha Reporter: Nicole C. Engard <nengard>
Component: Label/patron card printingAssignee: Chris Nighswonger <cnighswonger>
Status: In Discussion --- QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: liz, marjorie.barry-vila
Version: 3.12   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Call number splitting selected
splitting works
Same batch without splitting
Labels with split call numbers
Labels without split call numbers

Description Nicole C. Engard 2014-04-10 12:18:52 UTC
Created attachment 26968 [details]
Call number splitting selected

See the attached images. If I choose to not split call numbers I get zeros on my labels - if I do split the call number then I see the call number.
Comment 1 Nicole C. Engard 2014-04-10 12:19:07 UTC
Created attachment 26969 [details]
splitting works
Comment 2 Nicole C. Engard 2014-04-10 12:19:24 UTC
Created attachment 26970 [details]
Same batch without splitting
Comment 3 Chris Nighswonger 2014-04-10 12:56:16 UTC
Created attachment 26972 [details]
Labels with split call numbers
Comment 4 Chris Nighswonger 2014-04-10 12:56:41 UTC
Created attachment 26973 [details]
Labels without split call numbers
Comment 5 Chris Nighswonger 2014-04-10 12:57:03 UTC
I tested this on 3.14.3 (I don't have a working 3.12 atm) and cannot duplicate the problem. I've added as set of pdfs showing with and without splitting.

A quick look over the commit history for C4::Labels::Label does not indicate any significant changes. But that is only a quick look.

I wonder if someone else with a 3.12 system could confirm this bug?
Comment 6 Chris Nighswonger 2014-04-10 19:00:37 UTC
1. in the label creator tool, create two layouts for BIB only, selecting just the callnumber field, and setting the font to some reasonable size. On one of the layouts check the split callnumbers option; on the other leave it unchecked.

2. create a small batch of labels

3. export the batch twice; once using the layout with "split callnumber" selected and the other with the layout without the splitting option

4. compare the two resulting pdfs, checking to see if the one produced using the non-splitting template prints the numbers as expected.
Comment 7 Liz Rea 2015-08-14 02:01:50 UTC
I saw something like this, if you looked in the log it would say 

label-create-pdf.pl: Increasing $Text::Wrap::columns from 0 to 2 at /usr/share/koha/lib/C4/Labels/Label.pm line 442,

Decreasing the left text margin to 0 seemed to fix it.
Comment 8 Liz Rea 2015-08-14 02:02:43 UTC
(this was in 3.20.2, btw.)
Comment 9 Liz Rea 2015-08-14 02:03:41 UTC
label-create-pdf.pl: Use of uninitialized value $string_width in addition (+) at /usr/share/koha/lib/C4/Labels/Label.pm line 466. 

this one also possibly helpful.