Bug 14781 - Creation of barcode types 2of5 not functional
Summary: Creation of barcode types 2of5 not functional
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Label/patron card printing (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Marc Véron
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-09-03 16:57 UTC by Michael Kuhn
Modified: 2017-06-14 22:10 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 14781 - Creation of barcode types 2of5 not functional (1.82 KB, patch)
2015-09-04 08:04 UTC, Marc Véron
Details | Diff | Splinter Review
Examples of resultinng barcodes (2015-09-03) (4.35 KB, image/png)
2015-09-04 08:37 UTC, Michael Kuhn
Details
Examples of resulting barcodes (2015-09-03 COOP2of5) (3.99 KB, image/png)
2015-09-04 08:38 UTC, Michael Kuhn
Details
Selection links are missing (46.40 KB, image/png)
2015-09-07 23:47 UTC, Claudio Costales
Details
[SIGNED-OFF] Bug 14781 - Creation of barcode types 2of5 not functional (2.00 KB, patch)
2015-10-26 13:45 UTC, Bernardo Gonzalez Kriegel
Details | Diff | Splinter Review
[PASSED QA] Bug 14781 - Creation of barcode types 2of5 not functional (2.11 KB, patch)
2015-11-05 07:24 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Kuhn 2015-09-03 16:57:24 UTC
Koha menu "Tools > Labels home > Manage label

After setting up a new label layout using barcode type "COOP2of5" or "Industrial2of5", when trying to create some labels the layout won't render at all for both barcode types. Thus the resulting page will be completely empty.
Comment 1 Marc Véron 2015-09-04 07:44:13 UTC
intranet-error.log says:
label-create-pdf.pl: Barcode generation failed for item 11 with this error: Invalid Characters


Lines 539 (for COOP2of5 ) and 557 (for INDUSTRIAL2OF5) of C4/Labels/Label.pm surround the value with asterisks, however only digits are allowed. After removing the asterisks the barcodes are generated.
Comment 2 Marc Véron 2015-09-04 08:04:22 UTC Comment hidden (obsolete)
Comment 3 Michael Kuhn 2015-09-04 08:35:50 UTC
When removing the asterisks the layout actually renders. Though the resulting barcodes don't really look like barcode type Industrial2of5 or COOP2of5 (see the attachment).

To me it looks like the resulting barcodes are formatted like barcode type Code 39 (they apparently have the same length), so I doubt if an ordinary barcode reader would accept these codes. Correct me if I'm wrong.
Comment 4 Michael Kuhn 2015-09-04 08:37:19 UTC
Created attachment 42381 [details]
Examples of resultinng barcodes (2015-09-03)
Comment 5 Michael Kuhn 2015-09-04 08:38:36 UTC
Created attachment 42382 [details]
Examples of resulting barcodes (2015-09-03 COOP2of5)
Comment 6 Marc Véron 2015-09-04 10:02:24 UTC
Michael, did you print out the PDF and test?

BTW there is a Bug regarding the barcode dimensions: Bug 14149
Comment 7 Michael Kuhn 2015-09-04 10:51:11 UTC
Yes, I have printed the resulting barcodes.

But no, I have no barcode reader at hand, so I couldn't test if the printed barcodes are really COOP2of5 resp. Industrial2of5. They sure look like barcodes but to me they just don't look like I would expect the correct barcode type 2of5 to look like... The barcode numbers have just 8 digits and I think the resulting barcode is far too long...

However, I think these barcodes should be tested with an barcode reader. I will try to actually test them on 15 September when I'm at a library which owns an appropriate barcode reader.
Comment 8 Chris Nighswonger 2015-09-04 12:37:34 UTC
FTR, many of the less commonly used barcode types were simply brought over from the (very) old label code and not were not tested much at all. IIRC some of them may have even been left in a semi-complete state, so checking to be sure the resulting barcodes a) are actually the format they claim to be, and b) actually produce successful scans is imperative.
Comment 9 Marc Véron 2015-09-04 13:03:19 UTC
(In reply to Chris Nighswonger from comment #8)
> FTR, many of the less commonly used barcode types were simply brought over
> from the (very) old label code and not were not tested much at all. IIRC
> some of them may have even been left in a semi-complete state, so checking
> to be sure the resulting barcodes a) are actually the format they claim to
> be, and b) actually produce successful scans is imperative.

Chris, using this patch and changing the label dimensions (height) I could produce barcodes that look OK for me (I compared with same barcode values found in the internet). I suppose the problem Michael encounters is due to the hard coded barcode height (0.01 * label height), see related Bug 14149.

That said, I would appreciate if somebody could sign off on this patch.

Marc
Comment 10 Claudio Costales 2015-09-07 23:47:23 UTC
Created attachment 42444 [details]
Selection links are missing
Comment 11 Marc Véron 2015-09-08 03:58:29 UTC
(In reply to bondiurbano from comment #10)
> Created attachment 42444 [details]
> Selection links are missing

Thanks for testing, bondiurbano.

I suppose you wanted to create pateron cards, not labels?

This problem is already described in: 
Bug 14123 - Patroncard: Patron search for batch no longer has Select / Select All / Add selected
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14123

See attachment 14123 [details] [review]: 
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=38773

However, our bug 14781 is about creating labels, not patron cards:
Tools > Labels home > Manage label
Comment 12 Claudio Costales 2015-09-08 11:02:54 UTC
Sorry Marc, yesterday I was testing bug 14739 and it seems I've made a mistake. Really do not know how I could did it. I beg you discard my comment.
Comment 13 Marc Véron 2015-09-28 16:29:03 UTC
Ping for Signoff  :-)
Comment 14 Bernardo Gonzalez Kriegel 2015-10-26 13:45:03 UTC Comment hidden (obsolete)
Comment 15 Katrin Fischer 2015-11-05 07:24:06 UTC
Created attachment 44459 [details] [review]
[PASSED QA] Bug 14781 - Creation of barcode types 2of5 not functional

This patch fixes the rendering of "COOP2of5" or "Industrial2of5" barcodes in the label creator module.

To test:
- Create a label layout with COOP2of5 barcode type
- Create labels (make sure that the items's barcode values are numeric only!)
- Export batch and download PDF.

Without patch:
- No barcodes rendered
With patch
- Barcodes should render as expected. Test for both barcode types.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Works as described, tested both formats.
Non digit barcode is not printed.

No koha-qa errors, no t/ & xt/ errors

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Note: To be printed, barcode should be numerical.
Comment 16 Tomás Cohen Arazi 2015-11-05 13:38:35 UTC
Patch pushed to master.

Thanks Marc!
Comment 17 Frédéric Demians 2015-11-29 20:23:34 UTC
This patch has been pushed to 3.20.x, will be in 3.20.6.
Comment 18 Liz Rea 2016-01-06 21:19:25 UTC
Pushed to 3.18.13, and released.