[Bug 37316] New: Cannot add items to basket via file if barcodes not supplied
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37316 Bug ID: 37316 Summary: Cannot add items to basket via file if barcodes not supplied Change sponsored?: --- Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: critical Priority: P5 - low Component: Acquisitions Assignee: koha-bugs@lists.koha-community.org Reporter: nick@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org Bug 33171 added the ability to supply barcodes in MarcItemFieldsToOrder We didn't seem take into account that if no value is supplied, the default value from an html input is "" When you try to add multiple items with an empty string as the barcode, Koha dies. Duplicate ID at /usr/share/perl5/Exception/Class/Base.pm line 88 Exception::Class::Base::throw('Koha::Exceptions::Object::DuplicateID', 'error', 'Duplicate ID', 'duplicate_id', 'itembarcodeidx') called at /kohadevbox/koha/Koha/Object.pm line 178 Koha::Object::catch {...} ('DBIx::Class::Exception=HASH(0x558905ec0958)') called at /usr/share/perl5/Try/Tiny.pm line 123 Try::Tiny::try('CODE(0x558905ebb9d0)', 'Try::Tiny::Catch=REF(0x558905f638f0)') called at /kohadevbox/koha/Koha/Object.pm line 209 -- 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=37316 --- Comment #1 from Nick Clemens (kidclamp) <nick@bywatersolutions.com> --- Created attachment 168767 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=168767&action=edit Sample order file Below are the settigns that go with this file - for this bug remove the "barcode" from MarcItemFieldsToOrder MarcItemFieldsToOrder homebranch: 949$a holdingbranch: 949$b itype: 949$y nonpublic_note: 949$x public_note: 949$z loc: 949$c ccode: 949$8 notforloan: 949$7 uri: 949$u copyno: 949$t price: 949$g|949$j replacementprice: 949$v itemcallnumber: 949$o quantity: 949$k budget_code: 949$l barcode: 949$p coded_location_qualifier: 949$f enumchron: 949$h MarcFieldsToOrder price: 949$g quantity: 949$k budget_code: 949$l discount: 949$m sort1: 949$n sort2: 949$q -- 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=37316 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com --- Comment #2 from Lucas Gass <lucas@bywatersolutions.com> --- I cannot recreate this in current main. -- 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=37316 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|critical |normal -- 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=37316 Nick Clemens (kidclamp) <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|normal |critical -- 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=37316 Nick Clemens (kidclamp) <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |33171 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33171 [Bug 33171] Add coded_location_qualifier, barcode, and enumchron to MarcItemFieldsToOrder -- 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=37316 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Patch complexity|--- |Trivial patch -- 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=37316 --- Comment #3 from Lucas Gass <lucas@bywatersolutions.com> --- Created attachment 168853 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=168853&action=edit Bug 37316: Add tests -- 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=37316 --- Comment #4 from Lucas Gass <lucas@bywatersolutions.com> --- Created attachment 168854 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=168854&action=edit Bug 37316: Treat empty string barcodes as undef To test: 1.Add the following to MarcItemFieldsToOrder: homebranch: 949$a holdingbranch: 949$b itype: 949$y nonpublic_note: 949$x public_note: 949$z loc: 949$c ccode: 949$8 notforloan: 949$7 uri: 949$u copyno: 949$t price: 949$g|949$j replacementprice: 949$v itemcallnumber: 949$o quantity: 949$k budget_code: 949$l coded_location_qualifier: 949$f enumchron: 949$h 2. Add the following to MarcFieldsToOrder: price: 949$g quantity: 949$k budget_code: 949$l discount: 949$m sort1: 949$n sort2: 949$q 3. Acquisitions > Find a vendor 4. Create a new basket -> Add to basket -> From new file 5. Use the file uplodaded in this bug report. 6. Set format to MARCXML and stage for import. 7. Add staged files to basket 8. Select all, make sure you add an item type, and choose 'Do not look for matching records' 9. Save and kaboom. 10. APPLY PATCH and restart_all 11. Follow the steps again, this time no kaboom. -- 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=37316 Lucas Gass <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 watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37316 --- Comment #5 from Lucas Gass <lucas@bywatersolutions.com> --- Created attachment 168855 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=168855&action=edit Bug 37316: Adjust tests -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37316 Eric Garcia <cubingguy714@gmail.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=37316 Eric Garcia <cubingguy714@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #168855|0 |1 is obsolete| | --- Comment #6 from Eric Garcia <cubingguy714@gmail.com> --- Created attachment 168858 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=168858&action=edit Bug 37316: Adjust tests Signed-off-by: Eric Garcia <cubingguy714@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37316 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |rel_24_05_candidate -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37316 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@ptfs-europe | |.com QA Contact|testopia@bugs.koha-communit |martin.renvoize@ptfs-europe |y.org |.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37316 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #168853|0 |1 is obsolete| | --- Comment #7 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 168917 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=168917&action=edit Bug 37316: Add tests Signed-off-by: Martin Renvoize <martin.renvoize@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=37316 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #168854|0 |1 is obsolete| | --- Comment #8 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 168918 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=168918&action=edit Bug 37316: Treat empty string barcodes as undef To test: 1.Add the following to MarcItemFieldsToOrder: homebranch: 949$a holdingbranch: 949$b itype: 949$y nonpublic_note: 949$x public_note: 949$z loc: 949$c ccode: 949$8 notforloan: 949$7 uri: 949$u copyno: 949$t price: 949$g|949$j replacementprice: 949$v itemcallnumber: 949$o quantity: 949$k budget_code: 949$l coded_location_qualifier: 949$f enumchron: 949$h 2. Add the following to MarcFieldsToOrder: price: 949$g quantity: 949$k budget_code: 949$l discount: 949$m sort1: 949$n sort2: 949$q 3. Acquisitions > Find a vendor 4. Create a new basket -> Add to basket -> From new file 5. Use the file uplodaded in this bug report. 6. Set format to MARCXML and stage for import. 7. Add staged files to basket 8. Select all, make sure you add an item type, and choose 'Do not look for matching records' 9. Save and kaboom. 10. APPLY PATCH and restart_all 11. Follow the steps again, this time no kaboom. Signed-off-by: Martin Renvoize <martin.renvoize@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=37316 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #168858|0 |1 is obsolete| | --- Comment #9 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 168919 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=168919&action=edit Bug 37316: Adjust tests Signed-off-by: Eric Garcia <cubingguy714@gmail.com> Signed-off-by: Martin Renvoize <martin.renvoize@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=37316 Martin Renvoize <martin.renvoize@ptfs-europe.com> 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=37316 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |24.11.00 released in| | Status|Passed QA |Pushed to main -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37316 --- Comment #10 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Pushed for 24.11! Well done everyone, thank you! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37316 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|rel_24_05_candidate | Version(s)|24.11.00 |24.11.00,24.05.02 released in| | Status|Pushed to main |Pushed to stable --- Comment #11 from Lucas Gass <lucas@bywatersolutions.com> --- Backported to 24.05.x for upcoming 24.05.02 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37316 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m Status|Pushed to stable |Needs documenting --- Comment #12 from Fridolin Somers <fridolin.somers@biblibre.com> --- Depends on Bug 33171 not in 23.11.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37316 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC|martin.renvoize@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=37316 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the| |This fixes an error when release notes| |using MarcItemFieldsToOrder | |and order files from a | |vendor to stage and add | |records to a basket. If | |there were no barcodes in | |the order file, this caused | |an error when saving. Order | |files without barcodes can | |now be used. CC| |david@davidnind.com --- Comment #13 from David Nind <david@davidnind.com> --- I'm not sure I have got this release note right. Please update or clarify what this fixes if required. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37316 Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |emily.lamancusa@montgomeryc | |ountymd.gov Text to go in the|This fixes an error when |This fixes an error when release notes|using MarcItemFieldsToOrder |using order files from a |and order files from a |vendor to stage and add |vendor to stage and add |records with items to a |records to a basket. If |basket. If barcodes are not |there were no barcodes in |specified for the items |the order file, this caused |(either from the file or |an error when saving. Order |manually), this caused an |files without barcodes can |error when saving. Order |now be used. |files without barcodes can | |now be used. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37316 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs documenting |RESOLVED Resolution|--- |FIXED --- Comment #14 from Lucas Gass <lucas@bywatersolutions.com> --- this fixes a bug, nothing to document -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org