[Bug 34732] New: Barcode image generator doesn't generate correct Barcode
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34732 Bug ID: 34732 Summary: Barcode image generator doesn't generate correct Barcode Change sponsored?: --- Product: Koha Version: 23.05 Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Tools Assignee: koha-bugs@lists.koha-community.org Reporter: kfurst@prbschools.org QA Contact: testopia@bugs.koha-community.org Created attachment 155281 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=155281&action=edit Code39 Examples When using the barcode generator tool in Koha with the code39 settings, the barcode image it generates is not a code39 barcode and thus can't be read by our book scanners at checkout desks. I'm not sure what type of barcode it is but the generated image does not have the telltale opening and closing lines of a code39. I've attached two screenshots. The first is from the Koha tool with the non-working barcode. The second is from another barcode generating tool that makes a barcode exactly the same as the one on the book I have (already in the catalog). The number it is using is 34517100048832 We're new to Koha so this has been happening since we started using it this summer. Expected behavior would be for it to generate the correct barcode image for a code39 barcode. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34732 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au --- Comment #1 from David Cook <dcook@prosentient.com.au> --- Created attachment 155282 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=155282&action=edit Label creator and barcode generator create different barcodes -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34732 --- Comment #2 from David Cook <dcook@prosentient.com.au> --- Thanks for the report, Kevin. I've been using Koha for over 11 years and this is the first time I've actually noticed the "Barcode image generator" tool. I typically use the "Label creator" and have had no issues with it in the past. But it looks like you're right. I've attached a screenshot comparing the two tools, and it looks like the "Barcode image generator" is missing some of the start and end of the barcode. I'll take a quick look and see if I can find anything obvious... -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34732 --- Comment #3 from David Cook <dcook@prosentient.com.au> --- (In reply to David Cook from comment #2)
I've been using Koha for over 11 years and this is the first time I've actually noticed the "Barcode image generator" tool. I typically use the "Label creator" and have had no issues with it in the past.
Looks like the tool was added in Koha 22.05 so quite a recent feature, although the underlying barcode generation is much older, and I am sure I've used it for other things... -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34732 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |In Discussion --- Comment #4 from David Cook <dcook@prosentient.com.au> --- (In reply to David Cook from comment #2)
But it looks like you're right. I've attached a screenshot comparing the two tools, and it looks like the "Barcode image generator" is missing some of the start and end of the barcode.
Deep in the code, the "Label creator" puts a "*" at the start and end of the stored text barcode value before generating the barcode image. But the "Barcode image generator" doesn't do that automatically for you. To generate the barcode as you expect, you'd need to add the "*" to the start and end of your barcode before clicking "Show barcode". I suppose the question is whether or not we should have some automatic adding of the "*" prefix and suffix if it's not supplied... -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34732 --- Comment #5 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- We've run into the same issue. When using in notices we add the * before and after what we want to print and that fixes the issue. I think it would be great to test for these and add them if not present. It's not obvious for users and it took us quite some research to figure it out :) -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34732 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Barcode image generator |Barcode image generator |doesn't generate correct |doesn't generate correct |Barcode |Code39 barcode -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34732 --- Comment #6 from David Cook <dcook@prosentient.com.au> --- (In reply to Katrin Fischer from comment #5)
We've run into the same issue. When using in notices we add the * before and after what we want to print and that fixes the issue.
I think it would be great to test for these and add them if not present. It's not obvious for users and it took us quite some research to figure it out :)
Sounds like a plan. It should be easy enough to do. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34732 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|In Discussion |Needs Signoff -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34732 --- Comment #7 from David Cook <dcook@prosentient.com.au> --- Created attachment 155350 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=155350&action=edit Bug 34732: For Code39, append or prepend asterisk if missing from barcode This patch appends or prepends an asterisk on Code39 barcodes if they are missing from the input. This is so that they form correct Code39 barcode images. Test plan: 0. Apply the patch 1. koha-plack --reload kohadev 2. Go to http://localhost:8081/cgi-bin/koha/labels/barcode-print.pl 3. Type 39999000001310 into "Barcode" and click "Show barcode" 4. Note that the barcode text on the right includes asterisks around it 5. Type *39999000001310 into "Barcode" and click "Show barcode" 6. Note the same as above 7. Type 39999000001310* into "Barcode" and click "Show barcode" 8. Note the same as above 9. Type *39999000001310* into "Barcode" and click "Show barcode" 10. Note the same as above -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34732 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|enhancement |normal Assignee|koha-bugs@lists.koha-commun |dcook@prosentient.com.au |ity.org | -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34732 Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34732 Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #155350|0 |1 is obsolete| | --- Comment #8 from Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> --- Created attachment 155391 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=155391&action=edit Bug 34732: For Code39, append or prepend asterisk if missing from barcode This patch appends or prepends an asterisk on Code39 barcodes if they are missing from the input. This is so that they form correct Code39 barcode images. Test plan: 0. Apply the patch 1. koha-plack --reload kohadev 2. Go to http://localhost:8081/cgi-bin/koha/labels/barcode-print.pl 3. Type 39999000001310 into "Barcode" and click "Show barcode" 4. Note that the barcode text on the right includes asterisks around it 5. Type *39999000001310 into "Barcode" and click "Show barcode" 6. Note the same as above 7. Type 39999000001310* into "Barcode" and click "Show barcode" 8. Note the same as above 9. Type *39999000001310* into "Barcode" and click "Show barcode" 10. Note the same as above Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34732 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |victor@tuxayo.net --- Comment #9 from Victor Grousset/tuxayo <victor@tuxayo.net> --- For some reason GD::Barcode commented the addition of the surrounding "*" :o https://metacpan.org/release/KWITKNR/GD-Barcode-1.15/source/Barcode/Code39.p... -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34732 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |victor@tuxayo.net |y.org | --- Comment #10 from Victor Grousset/tuxayo <victor@tuxayo.net> --- 19 years since last update but there is a more recent fork. I contacted both maintainers to know if they are still active in the maintenance of this package. To then know if there is a reason to not have the surrounding "*" added. At least having the choice with a different method or params. Maybe the root of the problem is this:
This code is traditionally mapped to the * character in barcode fonts and will often appear with the human-readable representation alongside the barcode https://en.wikipedia.org/wiki/Code_39
Anyway given all that context, the proposed fix here makes sense. Testing in progress. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34732 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #155391|0 |1 is obsolete| | --- Comment #11 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Created attachment 155708 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=155708&action=edit Bug 34732: For Code39, append or prepend asterisk if missing from barcode This patch appends or prepends an asterisk on Code39 barcodes if they are missing from the input. This is so that they form correct Code39 barcode images. Test plan: 0. Apply the patch 1. koha-plack --reload kohadev 2. Go to http://localhost:8081/cgi-bin/koha/labels/barcode-print.pl 3. Type 39999000001310 into "Barcode" and click "Show barcode" 4. Note that the barcode text on the right includes asterisks around it 5. Type *39999000001310 into "Barcode" and click "Show barcode" 6. Note the same as above 7. Type 39999000001310* into "Barcode" and click "Show barcode" 8. Note the same as above 9. Type *39999000001310* into "Barcode" and click "Show barcode" 10. Note the same as above Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34732 --- Comment #12 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Created attachment 155709 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=155709&action=edit Bug 34732: (QA follow-up): tidy up code -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34732 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA --- Comment #13 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Works, makes sense, QA script happy, code looks good, passing QA :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34732 --- Comment #14 from Victor Grousset/tuxayo <victor@tuxayo.net> --- (double checked scanning with a phone before and after the patch) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34732 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |23.11.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34732 --- Comment #15 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Pushed to master for 23.11. Nice work everyone, thanks! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34732 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m Version(s)|23.11.00 |23.11.00,23.05.04 released in| | Status|Pushed to master |Pushed to stable --- Comment #16 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to 23.05.x for 23.05.04 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34732 Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |Pushed to oldstable Version(s)|23.11.00,23.05.04 |23.11.00,23.05.04,22.11.11 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34732 --- Comment #17 from Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> --- Nice work everyone! Pushed to oldstable for 22.11.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34732 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bugzilla@mediapipe.de --- Comment #18 from David Cook <dcook@prosentient.com.au> --- *** Bug 30156 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org