[Bug 42627] New: Printing a range of barcodes should be from and quantity instead of from and to
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42627 Bug ID: 42627 Summary: Printing a range of barcodes should be from and quantity instead of from and to Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Tools Assignee: koha-bugs@lists.koha-community.org Reporter: lucas@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org When printing a barcode range we should have "From" and "Number of barcodes to print" instead of "From" and "To". This way the user could enter the starting barcode and the number to print from there. This is because, like David says in Bug 41162, calculating the difference between from and to is hard. https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41162#c1 "Number of barcodes to print" could then have a limit, say 1000 which seems fair, and then we just exit the loop after that number. -- 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=42627 rschumann@utah.gov changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |rschumann@utah.gov --- Comment #1 from rschumann@utah.gov --- This would be great!!! We have had our whole system crash because someone was trying to print one barcode... and was doing 9 Million instead. Twice. -- 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=42627 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |lucas@bywatersolutions.com |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=42627 Lucas Gass (lukeg) <lucas@bywatersolutions.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=42627 --- Comment #2 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Created attachment 201675 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=201675&action=edit Bug 42627: Update templates to use count instead of to Patch from commit 5093450 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42627 --- Comment #3 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Created attachment 201676 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=201676&action=edit Bug 42627: Update scripts to account for count Patch from commit dfaacfb -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42627 --- Comment #4 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Created attachment 201677 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=201677&action=edit Bug 42627: Update labels Patch from commit 58b7e5d -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42627 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42627 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #201675|0 |1 is obsolete| | Attachment #201676|0 |1 is obsolete| | Attachment #201677|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=42627 --- Comment #5 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Created attachment 201678 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=201678&action=edit Bug 42627: Update templates to use count instead of to To test: 1. APPLY PATCH, restart_all 2. Go to Cataloging > Label creator > Print barcode range 3. Notice the labels now read "Starting barcode" and "Number of barcodes to print" 4. Find a barcode in you system. In KTD I do something like 'select barcode from items limit 10;' to find some 5. Enter a barcode and choose 9999 as the "Number of barcodes to print" 6. You should see an error message like "Cannot print more than 1000 barcodes at a time." 7. Choose a more reasonable number like 10 and click 'Print range' 8. On the next page choose a template and a layout and click "Export" 9. On the next page you should see something like "Barcodes from 3999900000001 to 3999900000010". Make sure the range looks correct. 10. Now open the PDF and make sure everything looks correct -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42627 --- Comment #6 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Created attachment 201679 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=201679&action=edit Bug 42627: Update scripts to account for count Patch from commit 3beb317 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42627 --- Comment #7 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Created attachment 201680 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=201680&action=edit Bug 42627: Update labels Patch from commit 113dd1a -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42627 Biblibre Sandboxes <sandboxes@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #201678|0 |1 is obsolete| | Attachment #201679|0 |1 is obsolete| | Attachment #201680|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=42627 --- Comment #8 from Biblibre Sandboxes <sandboxes@biblibre.com> --- Created attachment 202653 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=202653&action=edit Bug 42627: Update templates to use count instead of to To test: 1. APPLY PATCH, restart_all 2. Go to Cataloging > Label creator > Print barcode range 3. Notice the labels now read "Starting barcode" and "Number of barcodes to print" 4. Find a barcode in you system. In KTD I do something like 'select barcode from items limit 10;' to find some 5. Enter a barcode and choose 9999 as the "Number of barcodes to print" 6. You should see an error message like "Cannot print more than 1000 barcodes at a time." 7. Choose a more reasonable number like 10 and click 'Print range' 8. On the next page choose a template and a layout and click "Export" 9. On the next page you should see something like "Barcodes from 3999900000001 to 3999900000010". Make sure the range looks correct. 10. Now open the PDF and make sure everything looks correct Signed-off-by: Gretchen <maxeinergl@gcc.edu> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42627 --- Comment #9 from Biblibre Sandboxes <sandboxes@biblibre.com> --- Created attachment 202654 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=202654&action=edit Bug 42627: Update scripts to account for count Signed-off-by: Gretchen <maxeinergl@gcc.edu> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42627 --- Comment #10 from Biblibre Sandboxes <sandboxes@biblibre.com> --- Created attachment 202655 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=202655&action=edit Bug 42627: Update labels Signed-off-by: Gretchen <maxeinergl@gcc.edu> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42627 Gretchen Maxeiner <maxeinergl@gcc.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off CC| |maxeinergl@gcc.edu --- Comment #11 from Gretchen Maxeiner <maxeinergl@gcc.edu> --- This works as described and was easy to use! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42627 Laura Escamilla <Laura.escamilla@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |43437 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43437 [Bug 43437] Barcode range printing fails with 500 error when layout contains bibliographic data -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42627 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com --- Comment #12 from David Nind <david@davidnind.com> --- I saw this change when testing bug 43437, and I think there is an issue with it: the changed label "Number of barcodes to print" is misleading. Using KTD (and the sample data) I entered: - Starting barcode: 3999900000001 - Number of barcodes to print: 500 The result is that it only generated 7 barcodes: 3999900000001 3999900000002 3999900000017 3999900000018 3999900000019 3999900000020 3999900000021 I think the "Number of barcodes to print" is misleading, as it is actually only printing any barcodes that exist from the starting barcode entered plus adding the number entered to that sequence, not the next X barcodes. For example, if 500 is entered, and the starting barcode is 3999900000001, then it is only going to print the barcodes that EXIST up until 3999900000500 - not the next 500 barcodes in sequence after 3999900000001. So I'm not sure what is the best way forward here. Maybe add some hint text, or change the label, but I'm struggling to come up with something that is concise and makes sense: "Prints the number of barcodes from the starting barcode, if they exist." "Prints the number of barcodes from the starting barcode, if they exist." "Only prints barcodes that exist from the starting barcode, plus the number entered in sequence." Or maybe I am misunderstanding the purpose of the tool. I think I originally understood it to be about printing me a batch of X barcodes starting from this barcode, so I can use with new books catalogued - not existing barcode in the system. Or may be that is another feature somewhere else? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42627 --- Comment #13 from Gretchen Maxeiner <maxeinergl@gcc.edu> --- That's interesting. I tested this again in case I made a goof but couldn't replicate those results. I'm in sandbox but if I start with 3999900000001 and ask for 500 barcodes, the export file is 500 barcodes running sequentially. The export screen offering the PDF download (label-print.pl) tells me it covers "Barcodes from 3999900000001 to 3999900000500", which matches the file. This is the same result as it was prepatch from me entering a starting barcode of "3999900000001" and an end barcode of "3999900000500". It doesn't appear to me that this tool is consulting the system for known barcodes at all (either pre- or post-patch). I did assume that was being used to create new barcode labels not yet linked to records, so that seemed normal to me. Realistically, I would not be entering a barcode number already in use in the system, but the next sequential one after the last one I've printed. The label settings I tested with were the Avery 5160 | 1 x 2-5/8 template, and the DEFAULT layout. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42627 --- Comment #14 from David Nind <david@davidnind.com> --- Thanks Gretchen! It looks like I should have tested this bug by itself. It does indeed work as advertised. It produces X number of labels in sequence from the starting barcode. It doesn't just print barcodes that exist in the system/ Looks like bug 43437 changed the behavour in ways, and I blamed this bug! 8-) Apologies for the false alarm! David -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42627 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |andrew@bywatersolutions.com |y.org | 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=42627 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #202653|0 |1 is obsolete| | Attachment #202654|0 |1 is obsolete| | Attachment #202655|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=42627 --- Comment #15 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Created attachment 207835 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=207835&action=edit Bug 42627: Update templates to use count instead of to To test: 1. APPLY PATCH, restart_all 2. Go to Cataloging > Label creator > Print barcode range 3. Notice the labels now read "Starting barcode" and "Number of barcodes to print" 4. Find a barcode in you system. In KTD I do something like 'select barcode from items limit 10;' to find some 5. Enter a barcode and choose 9999 as the "Number of barcodes to print" 6. You should see an error message like "Cannot print more than 1000 barcodes at a time." 7. Choose a more reasonable number like 10 and click 'Print range' 8. On the next page choose a template and a layout and click "Export" 9. On the next page you should see something like "Barcodes from 3999900000001 to 3999900000010". Make sure the range looks correct. 10. Now open the PDF and make sure everything looks correct Signed-off-by: Gretchen <maxeinergl@gcc.edu> Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42627 --- Comment #16 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Created attachment 207836 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=207836&action=edit Bug 42627: Update scripts to account for count Signed-off-by: Gretchen <maxeinergl@gcc.edu> Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42627 --- Comment #17 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Created attachment 207837 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=207837&action=edit Bug 42627: Update labels Signed-off-by: Gretchen <maxeinergl@gcc.edu> Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42627 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |rel_26_11_candidate -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42627 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |philip.orr@lmscloud.de --- Comment #18 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- *** Bug 41162 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42627 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the| |This enhancement changes release notes| |the inputs when printing a | |range of barcodes. | |Previously the tool asked | |for a "From" and a "To" to | |define the range of | |barcodes. This patch | |changes that to have a | |"Starting barcode" and a | |"Number of barcodes to | |print" to define the range. | |The enhancement also limits | |the total number of | |barcodes that can be | |printed at once to 1000. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42627 Pedro Amorim (ammopt) <pedro.amorim@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Failed QA CC| |pedro.amorim@openfifth.co.u | |k --- Comment #19 from Pedro Amorim (ammopt) <pedro.amorim@openfifth.co.uk> --- Hi all: Blocker: leading zeros are dropped from the printed barcodes 1) Open http://localhost:8081/cgi-bin/koha/labels/label-edit-range.pl 2) Enter 'Starting barcode' 000123 and 'Number of barcodes to print' 3, then click 'Print range' 3) Pick any template and layout, and click 'Export' 4) Click 'Download as PDF'. The barcodes read 123, 124, 125 5) Without the patches, do the same with 'From' 000123 and 'To' 000125. The PDF reads 000123, 000124, 000125 Non-blockers: - In label-create-pdf.pl, the 'else' became 'elsif ($batch_id)'. Was this intended? It isn't mentioned in the commit message. - The from/count/to parsing (including the 1000 cap) is now duplicated in label-print.pl and label-create-pdf.pl. Could it live in one shared place? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42627 --- Comment #20 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Created attachment 208705 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=208705&action=edit Bug 42627: (follow-up) Move range logic to its own sub -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42627 --- Comment #21 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Created attachment 208706 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=208706&action=edit Bug 42627: (follow-up) Add unit tests -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42627 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42627 --- Comment #22 from Pedro Amorim (ammopt) <pedro.amorim@openfifth.co.uk> --- Not blockers as this is staged for push, but a few opportunities for follow-ups: 1) Open http://localhost:8081/cgi-bin/koha/labels/label-edit-range.pl 2) Enter 'Starting barcode' 000123 and 'Number of barcodes to print' 3, then click 'Print range' 3) Pick any template and layout, and click 'Export' 4) The legend reads 'Barcodes from 000123 to 125'. The batch already carries 'to' (txt_to), but label-print.tt:132 still computes from + count - 1. Using batche.to there would show 000123 to 000125 - barcode_length is now dead in label-print.tt: the PDF link param (line 136) and the hidden input (line 176) are always empty, and label-create-pdf.pl derives the length from 'from' anyway - Still curious about the 'else' -> 'elsif ($batch_id)' change in label-create-pdf.pl, was that intended? - Nits: the get_barcode_range POD shows positional args but it takes a hashref, and label-print.pl now has two 'use C4::Creators::Lib' lines -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42627 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=42627 --- Comment #23 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.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42627 --- Comment #24 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- (In reply to Pedro Amorim (ammopt) from comment #23)
Thanks everyone! Pushed to main for 26.11!
Thanks, Pedro! I filed Bug 43895 to address your concerns. I will follow-up there: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43895 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42627 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to main |Needs documenting --- Comment #25 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Enhancement, no 26.05.x backport. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42627 Pedro Amorim (ammopt) <pedro.amorim@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |43895 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43895 [Bug 43895] Bug 42627 improvements and follow-ups -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org