Bug 13545 - Add barcode image generator service
Summary: Add barcode image generator service
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Notices (show other bugs)
Version: 3.22
Hardware: PC Windows
: P1 - high normal (vote)
Assignee: Kyle M Hall
QA Contact: Testopia
URL:
Keywords: Manual
Depends on:
Blocks: 20676 20894 27013
  Show dependency treegraph
 
Reported: 2015-01-09 16:40 UTC by Kyle M Hall
Modified: 2023-10-28 18:13 UTC (History)
6 users (show)

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


Attachments
Bug 13545 - Add barcode image generator service (2.41 KB, patch)
2015-01-09 16:49 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 13545 - Add barcode image generator service (2.41 KB, patch)
2015-01-09 17:13 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 13545 - Add barcode image generator service (2.40 KB, patch)
2015-01-12 12:03 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 13545 - Add barcode image generator service (2.43 KB, patch)
2015-01-13 01:15 UTC, Brandon
Details | Diff | Splinter Review
Bug 13545 - Add barcode image generator service (2.49 KB, patch)
2015-01-16 10:12 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 13545: (followup) POD and error handling (1.97 KB, patch)
2015-02-10 15:56 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 13545 - Add barcode image generator service (2.51 KB, patch)
2015-02-13 16:22 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 13545: (followup) POD and error handling (2.03 KB, patch)
2015-02-13 16:22 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 13545 [QA Followup] - Complete POD documentation (1.09 KB, patch)
2015-02-13 16:22 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 13545 [QA Followup] - Complete POD documentation (954 bytes, patch)
2015-02-13 16:23 UTC, Kyle M Hall
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Kyle M Hall 2015-01-09 16:40:23 UTC
If we add a script to Koha that can be passed a barcode, we will be able to easily embed item and patron barcodes into html printable slips and notices. This can be very helpful for librarians, as it means scanning an image instead of typing in the barcode manually.
Comment 1 Kyle M Hall 2015-01-09 16:49:01 UTC Comment hidden (obsolete)
Comment 2 Kyle M Hall 2015-01-09 17:13:12 UTC Comment hidden (obsolete)
Comment 3 Kyle M Hall 2015-01-12 12:03:44 UTC Comment hidden (obsolete)
Comment 4 Brandon 2015-01-13 01:15:16 UTC Comment hidden (obsolete)
Comment 5 Jonathan Druart 2015-01-16 10:12:27 UTC Comment hidden (obsolete)
Comment 6 Jonathan Druart 2015-01-16 10:13:46 UTC
It could be great to have a small POD, to know the codes it's possible to use.
And maybe should we catch potential errors raised by the last line of the script?
Comment 7 Tomás Cohen Arazi 2015-02-10 15:56:28 UTC Comment hidden (obsolete)
Comment 8 Tomás Cohen Arazi 2015-02-10 15:59:30 UTC
I'm failing this one, even though I attached a followup so the author checks both the followup and the POD I added.

It should be clear which barcode 'types' we support, and they should be added to the dependencies if needed. For instance, I'm not sure we might add GD::Barcode to the dependencies.

I tried with GD::Barcode:::QRcode and GD::Barcode::UPCE, and it works fine.

I tested using an empty barcode number to generate an error.

Please revisit and sign if it is ok, but at least the POD should be ammended.
Comment 9 Kyle M Hall 2015-02-13 16:21:50 UTC
(In reply to Tomás Cohen Arazi from comment #8)
> I'm failing this one, even though I attached a followup so the author checks
> both the followup and the POD I added.
> 
> It should be clear which barcode 'types' we support, and they should be
> added to the dependencies if needed. For instance, I'm not sure we might add
> GD::Barcode to the dependencies.
> 
> I tried with GD::Barcode:::QRcode and GD::Barcode::UPCE, and it works fine.
> 
> I tested using an empty barcode number to generate an error.
> 
> Please revisit and sign if it is ok, but at least the POD should be ammended.

All the barcode types are part of the GD::Barcode module with the exception of Code93 which is used by the Canadian postal server. As such, I've left it out of the list for simplicity.
Comment 10 Kyle M Hall 2015-02-13 16:22:14 UTC
Created attachment 35912 [details] [review]
Bug 13545 - Add barcode image generator service

If we add a script to Koha that can be passed a barcode, we will be able
to easily embed item and patron barcodes into html printable slips and
notices. This can be very helpful for librarians, as it means scanning
an image instead of typing in the barcode manually.

This patch adds a barcode image generator that can be passed a barcode
and an optional type ( defaults to Code39, all GD::Barcode types should
work ). This image can be embedded in html slips and notices.
( e.g. <img src="/cgi-bin/koha/svc/barcode?barcode=<<items.barcode>>"></img> )

Test Plan:
1) Apply this patch
2) Browse to /cgi-bin/koha/svc/barcode?barcode=123456789 on your server
3) Note the barcode image

Signed-off-by: Brandon <brandon_h27@hotmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Comment 11 Kyle M Hall 2015-02-13 16:22:24 UTC
Created attachment 35913 [details] [review]
Bug 13545: (followup) POD and error handling

This patch adds POD to the new /svc/barcode service, and also implements some
error handling.

Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 12 Kyle M Hall 2015-02-13 16:22:26 UTC Comment hidden (obsolete)
Comment 13 Kyle M Hall 2015-02-13 16:23:02 UTC
Created attachment 35915 [details] [review]
Bug 13545 [QA Followup] - Complete POD documentation
Comment 14 Tomás Cohen Arazi 2015-02-13 17:13:13 UTC
Patches pushed to master.

Thanks Kyle!
Comment 15 Geetmala 2017-01-30 05:19:18 UTC
How to change library code in koha 3.20 because we seven branches each sch we have taken 3 letter before accession no. as barcode two of our sch name Prabhadevi and Sayani we started with PRAB and SAYA.  I want to change PRA and SAY instead of that please suggest me.
Comment 16 Katrin Fischer 2017-01-30 08:32:25 UTC
I think this is not possible with configuration in 3.20 - maybe it will be possible once notices templates are using template toolkit. This feature is in development for 17.05. If you want help for a customization, it's better to ask on the mailing list.
Comment 17 Katrin Fischer 2022-01-05 12:26:39 UTC
Maybe I missed it, but I think this would be great to have in the manual as it makes it possible to add scannable information to slips
Comment 18 Katrin Fischer 2022-10-02 11:45:15 UTC
I was trying to set this to 'needs documenting' but I can't reach the status it seems :(
Comment 19 Katrin Fischer 2022-10-02 11:45:49 UTC
CLOSED FIXED > Needs Documenting doesn't work, but:
RESOLVED FIXED > Needs Documenting does :)
Comment 20 Caroline Cyr La Rose 2022-12-22 21:07:59 UTC
Katrin, I documented bug 29821 which is the staff interface version of this tool. Do you need it documented elsewhere?
Comment 21 Katrin Fischer 2023-10-28 18:13:02 UTC
(In reply to Caroline Cyr La Rose from comment #20)
> Katrin, I documented bug 29821 which is the staff interface version of this
> tool. Do you need it documented elsewhere?

No, that sounds great :) I think I asked for this bevor the tool was added that made the feature more visible.