[Bug 37550] New: bulkmarcimport.pl dies when adding items throws an exception
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37550 Bug ID: 37550 Summary: bulkmarcimport.pl dies when adding items throws an exception Change sponsored?: --- Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Command-line Utilities Assignee: koha-bugs@lists.koha-community.org Reporter: nick@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org CC: robin@catalyst.net.nz The script runs item addition in an eval, and skips the record if there is an error. Before we deal with the error, however, we try to see if items were added by accessing a hash of itemnumebrs returned. When we throw an exception, the variable is not set. We should move that line after the error handling -- 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=37550 Nick Clemens (kidclamp) <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- 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=37550 --- Comment #1 from Nick Clemens (kidclamp) <nick@bywatersolutions.com> --- Created attachment 169959 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=169959&action=edit Bug 37550: Move item check after error handling To test: 1 - Grab the sample file on this bug report 2 - perl misc/migration_tools/bulkmarcimport.pl -b --file=spaceditems.pl -v 3 - An exception for 'Duplicate ID' is thrown and script dies 4 - Apply patch 5 - run script again 6 - The script finishes, no items are added, but record is -- 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=37550 --- Comment #2 from Nick Clemens (kidclamp) <nick@bywatersolutions.com> --- Created attachment 169960 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=169960&action=edit Bug 37550: Unit test for CheckItemPreSave -- 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=37550 --- Comment #3 from Nick Clemens (kidclamp) <nick@bywatersolutions.com> --- Created attachment 169961 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=169961&action=edit Bug 37550: CheckItemPreSave should run barcodes through barcodedecode In Koha::Item we run a barcode through barcodedecode before any save. We should do the same when checking barcodes to avoid a duplicate error when the barcode is cleaned before it is written to the DB To test: 1 - Follow previous test plan 2 - Note that after this patch is applied there is no exception All items are skipped as duplicate barcodes -- 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=37550 Phil Ringnalda <phil@chetcolibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |phil@chetcolibrary.org Assignee|koha-bugs@lists.koha-commun |nick@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=37550 Nick Clemens (kidclamp) <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=37478 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37550 --- Comment #4 from Phil Ringnalda <phil@chetcolibrary.org> --- I don't see the sample file. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37550 --- Comment #5 from Nick Clemens (kidclamp) <nick@bywatersolutions.com> --- Created attachment 170630 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=170630&action=edit Sample file -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37550 Phil Ringnalda <phil@chetcolibrary.org> 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=37550 Phil Ringnalda <phil@chetcolibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #169959|0 |1 is obsolete| | --- Comment #6 from Phil Ringnalda <phil@chetcolibrary.org> --- Created attachment 170648 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=170648&action=edit Bug 37550: Move item check after error handling To test: 1 - Grab the sample file on this bug report 2 - perl misc/migration_tools/bulkmarcimport.pl -b --file=spaceditems.pl -v 3 - An exception for 'Duplicate ID' is thrown and script dies 4 - Apply patch 5 - run script again 6 - The script finishes, no items are added, but record is Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37550 Phil Ringnalda <phil@chetcolibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #169960|0 |1 is obsolete| | --- Comment #7 from Phil Ringnalda <phil@chetcolibrary.org> --- Created attachment 170649 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=170649&action=edit Bug 37550: Unit test for CheckItemPreSave Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37550 Phil Ringnalda <phil@chetcolibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #169961|0 |1 is obsolete| | --- Comment #8 from Phil Ringnalda <phil@chetcolibrary.org> --- Created attachment 170650 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=170650&action=edit Bug 37550: CheckItemPreSave should run barcodes through barcodedecode In Koha::Item we run a barcode through barcodedecode before any save. We should do the same when checking barcodes to avoid a duplicate error when the barcode is cleaned before it is written to the DB To test: 1 - Follow previous test plan 2 - Note that after this patch is applied there is no exception All items are skipped as duplicate barcodes Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37550 Kyle M Hall (khall) <kyle@bywatersolutions.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=37550 Kyle M Hall (khall) <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #170648|0 |1 is obsolete| | Attachment #170649|0 |1 is obsolete| | Attachment #170650|0 |1 is obsolete| | --- Comment #9 from Kyle M Hall (khall) <kyle@bywatersolutions.com> --- Created attachment 173868 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=173868&action=edit Bug 37550: Move item check after error handling To test: 1 - Grab the sample file on this bug report 2 - perl misc/migration_tools/bulkmarcimport.pl -b --file=spaceditems.pl -v 3 - An exception for 'Duplicate ID' is thrown and script dies 4 - Apply patch 5 - run script again 6 - The script finishes, no items are added, but record is Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org> Signed-off-by: Kyle M Hall <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=37550 --- Comment #10 from Kyle M Hall (khall) <kyle@bywatersolutions.com> --- Created attachment 173869 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=173869&action=edit Bug 37550: Unit test for CheckItemPreSave Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org> Signed-off-by: Kyle M Hall <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=37550 --- Comment #11 from Kyle M Hall (khall) <kyle@bywatersolutions.com> --- Created attachment 173870 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=173870&action=edit Bug 37550: CheckItemPreSave should run barcodes through barcodedecode In Koha::Item we run a barcode through barcodedecode before any save. We should do the same when checking barcodes to avoid a duplicate error when the barcode is cleaned before it is written to the DB To test: 1 - Follow previous test plan 2 - Note that after this patch is applied there is no exception All items are skipped as duplicate barcodes Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org> Signed-off-by: Kyle M Hall <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=37550 Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |kyle@bywatersolutions.com |y.org | 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=37550 Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bernard.scaife@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=37550 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=37550 --- Comment #12 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=37550 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com Version(s)|24.11.00 |24.11.00,24.05.06 released in| | Status|Pushed to main |Pushed to stable --- Comment #13 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Backported to 24.05.x for upcoming 24.05.06 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37550 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |Pushed to oldstable -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37550 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m --- Comment #14 from Fridolin Somers <fridolin.somers@biblibre.com> --- Arf this script changed a lot since Bug 29440 Please provide patches for 23.111.x if you can -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37550 Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |wainuiwitikapark@catalyst.n | |et.nz Status|Pushed to oldstable |Needs documenting --- Comment #15 from Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz> --- Not backporting to 22.11 unless requested -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org