[Bug 24535] New: Add the ability to have longer barcodes than 20 digits
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24535 Bug ID: 24535 Summary: Add the ability to have longer barcodes than 20 digits Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Cataloging Assignee: nick@bywatersolutions.com Reporter: kelly@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org CC: m.de.rooy@rijksmuseum.nl Currently, in Koha, an item's barcode can only be up to 20 digits, it would be nice to increase this value to possibly a higher number such as 32. Koha recently increased the patron's barcode length to 32 and it was helpful to libraries. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24535 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=25385 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24535 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kyle@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24535 Janusz Kaczmarek <januszop@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |januszop@gmail.com --- Comment #1 from Janusz Kaczmarek <januszop@gmail.com> --- I strongly support this idea. Limiting the barcode length to 20 is insufficient for some libraries. Until now, it was possible to locally increase the barcode length in the items.barcode table; however, after introducing length validation in the API via Bug 40176, such local solutions no longer work and require additional local fixes. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24535 Janusz Kaczmarek <januszop@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|enhancement |normal Priority|P5 - low |P3 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24535 Janusz Kaczmarek <januszop@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24535 --- Comment #2 from Janusz Kaczmarek <januszop@gmail.com> --- Created attachment 197279 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=197279&action=edit Bug 24535: DB updates BTW, Koha/Schema/Result/Item.pm need to be updated as well -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24535 --- Comment #3 from Janusz Kaczmarek <januszop@gmail.com> --- Created attachment 197280 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=197280&action=edit Bug 24535: Add the ability to have longer barcodes than 20 digits Currently, in Koha, an item's barcode can only be up to 20 digits, it would be nice to increase this value to possibly a higher number such as 32. Koha recently increased the patron's barcode length to 32 and it was helpful to libraries. OpenAPI adjustments for item's barcode maxLength. Test plan: ---------- 1. In item editing, enter a barcode longer than 20 characters, e.g. 987654321098765432109876543210. 2. The barcode will not be saved (cf. Bug 42355). In a production environment without SQL strict mode, the barcode will be truncated to 20 characters. 3. apply patch; updatedatabase; ; yarn build; restart_all 4. Again, in item editing, enter a barcode longer than 20 characters, e.g. 987654321098765432109876543210. 5. Verify that the barcode is now saved in full. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24535 --- Comment #4 from Janusz Kaczmarek <januszop@gmail.com> --- BTW, a local database change and barcodes longer than 20 characters, after applying Bug 40176, result in the following message in Normal View when loading the items table: Something went wrong when loading the table. 500: Internal Server Error. String is too long: 25/20.Have a look at the 'Audit' button in the toolbar However, the Audit button does not provide any explanation. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24535 Nick Clemens (kidclamp) <nick@bywatersolutions.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=24535 Nick Clemens (kidclamp) <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #197279|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24535 Nick Clemens (kidclamp) <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #197280|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24535 --- Comment #5 from Nick Clemens (kidclamp) <nick@bywatersolutions.com> --- Created attachment 197502 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=197502&action=edit Bug 24535: DB updates BTW, Koha/Schema/Result/Item.pm need to be updated as well Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24535 --- Comment #6 from Nick Clemens (kidclamp) <nick@bywatersolutions.com> --- Created attachment 197503 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=197503&action=edit Bug 24535: Add the ability to have longer barcodes than 20 digits Currently, in Koha, an item's barcode can only be up to 20 digits, it would be nice to increase this value to possibly a higher number such as 32. Koha recently increased the patron's barcode length to 32 and it was helpful to libraries. OpenAPI adjustments for item's barcode maxLength. Test plan: ---------- 1. In item editing, enter a barcode longer than 20 characters, e.g. 987654321098765432109876543210. 2. The barcode will not be saved (cf. Bug 42355). In a production environment without SQL strict mode, the barcode will be truncated to 20 characters. 3. apply patch; updatedatabase; ; yarn build; restart_all 4. Again, in item editing, enter a barcode longer than 20 characters, e.g. 987654321098765432109876543210. 5. Verify that the barcode is now saved in full. Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24535 Nick Clemens (kidclamp) <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|nick@bywatersolutions.com |januszop@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24535 Nick Clemens (kidclamp) <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nick@bywatersolutions.com --- Comment #7 from Nick Clemens (kidclamp) <nick@bywatersolutions.com> --- Created attachment 197504 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=197504&action=edit Test KOC file Add an item with barcode 1234567890123456789012345 Upload via circulation -> upload offline circulation file -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24535 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@gmail.com --- Comment #8 from Jonathan Druart <jonathan.druart@gmail.com> --- Should this be adjusted as well? C4/Labels/Label.pm 539 #NOTE: Barcode length algorithm comes from PDF::Reuse::Barcode 540 #NOTE: 20 is arbitrary padding added to the barcode background by PDF::Reuse::Barcode 541 my $oGdB = GD::Barcode::Code39->new("*$params{'barcode_data'}*"); 542 my $whole_barcode_length = ( length( $oGdB->barcode() ) * 0.9 ) + 20; -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24535 --- Comment #9 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 197774 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=197774&action=edit Bug 24535: Add tests Patch from commit 2f61401 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24535 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |In Discussion --- Comment #10 from Jonathan Druart <jonathan.druart@gmail.com> --- And this one? 28 koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt: <input id="barcode" name="barcode" size="20" type="text" class="focus form-control" autocomplete="off" / > -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24535 --- Comment #11 from Janusz Kaczmarek <januszop@gmail.com> --- Created attachment 207567 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=207567&action=edit Bug 24535: corrected input field size for barcode in sco-main.tt -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24535 Janusz Kaczmarek <januszop@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|In Discussion |Signed Off --- Comment #12 from Janusz Kaczmarek <januszop@gmail.com> --- (In reply to Jonathan Druart from comment #8)
Should this be adjusted as well?
C4/Labels/Label.pm 539 #NOTE: Barcode length algorithm comes from PDF::Reuse::Barcode 540 #NOTE: 20 is arbitrary padding added to the barcode background by PDF::Reuse::Barcode 541 my $oGdB = GD::Barcode::Code39->new("*$params{'barcode_data'}*"); 542 my $whole_barcode_length = ( length( $oGdB->barcode() ) * 0.9 ) + 20;
It seems to me that this "20" is just a kind of padding in labels, but not the barcode length itself. The coincidence of the two “20s” seems accidental. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24535 Lisette Scheer <lisette@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |katrin.fischer@bsz-bw.de |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24535 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com Keywords| |release-notes-needed -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24535 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |25386 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25386 [Bug 25386] Internal server error when duplicate/too long barcodes are used in acquisition -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24535 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24535 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #197502|0 |1 is obsolete| | Attachment #197503|0 |1 is obsolete| | Attachment #197774|0 |1 is obsolete| | Attachment #207567|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24535 --- Comment #13 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 210055 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=210055&action=edit Bug 24535: DB updates BTW, Koha/Schema/Result/Item.pm need to be updated as well Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24535 --- Comment #14 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 210056 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=210056&action=edit Bug 24535: Add the ability to have longer barcodes than 20 digits Currently, in Koha, an item's barcode can only be up to 20 digits, it would be nice to increase this value to possibly a higher number such as 32. Koha recently increased the patron's barcode length to 32 and it was helpful to libraries. OpenAPI adjustments for item's barcode maxLength. Test plan: ---------- 1. In item editing, enter a barcode longer than 20 characters, e.g. 987654321098765432109876543210. 2. The barcode will not be saved (cf. Bug 42355). In a production environment without SQL strict mode, the barcode will be truncated to 20 characters. 3. apply patch; updatedatabase; ; yarn build; restart_all 4. Again, in item editing, enter a barcode longer than 20 characters, e.g. 987654321098765432109876543210. 5. Verify that the barcode is now saved in full. Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24535 --- Comment #15 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 210057 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=210057&action=edit Bug 24535: Add tests Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24535 --- Comment #16 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 210058 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=210058&action=edit Bug 24535: corrected input field size for barcode in sco-main.tt Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24535 --- Comment #17 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 210059 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=210059&action=edit Bug 24535: Fix input field on sci-main.tt Same change as for sco-main in previous patch. Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24535 --- Comment #18 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I found another: koha-tmpl/opac-tmpl/bootstrap/en/modules/sci/sci-main.tt: <input id="barcode_input" name="barcode_input" size="20" type="text" class="focus form-control" autocomplete="off" /> Fixed in follow-up patch. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24535 --- Comment #19 from Pedro Amorim (ammopt) <pedro.amorim@openfifth.co.uk> --- Created attachment 210449 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=210449&action=edit Bug 24535: (RM follow-up) Keep barcode column comments and fix Items.t plan The atomicupdate modified items.barcode and deleteditems.barcode without their COMMENT, so upgraded databases lost 'item barcode (MARC21 952$p)' and no longer matched kohastructure.sql. Items.t now runs 30 tests on top of bug 43102, so the plan is bumped to 30. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24535 Pedro Amorim (ammopt) <pedro.amorim@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to main Version(s)| |26.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=24535 --- Comment #20 from Pedro Amorim (ammopt) <pedro.amorim@openfifth.co.uk> --- Thanks everyone! Pushed to main for 26.11! -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org