[Bug 29794] New: delete_items.pl missing include
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29794 Bug ID: 29794 Summary: delete_items.pl missing include Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: major Priority: P5 - low Component: Command-line Utilities Assignee: koha-bugs@lists.koha-community.org Reporter: tomascohen@gmail.com QA Contact: testopia@bugs.koha-community.org CC: robin@catalyst.net.nz To reproduce: 1. Choose an item that is checked out and copy its barcode 2. Run: $ kshell k$ perl misc/cronjobs/delete_items.pl --verbose \ --where "barcode='39999000010831'" => FAIL: It explodes with: Can't locate object method "find" via package "Koha::Items"... -- 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=29794 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |tomascohen@gmail.com |ity.org | Blocks| |29788 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29788 [Bug 29788] Make Koha::Item->safe_to_delete return a Koha::Result::Boolean object -- 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=29794 Tomás Cohen Arazi <tomascohen@gmail.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.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29794 --- Comment #1 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 129011 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=129011&action=edit Bug 29794: Add missing include in delete_items.pl This patch adds a missing include so the script is no longer broken. To test: 1. Choose an item that is checked out and copy its barcode 2. Run: $ kshell k$ perl misc/cronjobs/delete_items.pl --verbose \ --where "barcode='39999000010831'" => FAIL: It explodes with: Can't locate object method "find" via package "Koha::Items"... 3. Apply this patch 4. Repeat 2 => SUCCESS: You get: Where statement: where barcode='39999000010831' Item '549' not deleted: book_on_loan 5. Sign off :-D -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29794 --- Comment #2 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 129012 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=129012&action=edit Bug 29794: (follow-up) Add license -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29794 Lucas Gass <lucas@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=29794 --- Comment #3 from Lucas Gass <lucas@bywatersolutions.com> --- Created attachment 129014 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=129014&action=edit Bug 29794: Add missing include in delete_items.pl This patch adds a missing include so the script is no longer broken. To test: 1. Choose an item that is checked out and copy its barcode 2. Run: $ kshell k$ perl misc/cronjobs/delete_items.pl --verbose \ --where "barcode='39999000010831'" => FAIL: It explodes with: Can't locate object method "find" via package "Koha::Items"... 3. Apply this patch 4. Repeat 2 => SUCCESS: You get: Where statement: where barcode='39999000010831' Item '549' not deleted: book_on_loan 5. Sign off :-D Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29794 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #129012|0 |1 is obsolete| | --- Comment #4 from Lucas Gass <lucas@bywatersolutions.com> --- Created attachment 129015 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=129015&action=edit Bug 29794: (follow-up) Add license Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29794 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com Attachment #129011|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=29794 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart+koha@gmail. | |com See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=28255 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29794 --- Comment #5 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Does nobody use this script? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29794 Jonathan Druart <jonathan.druart+koha@gmail.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=29794 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #129015|0 |1 is obsolete| | --- Comment #6 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 129017 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=129017&action=edit Bug 29794: (follow-up) Add license Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29794 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m Depends on| |23463 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23463 [Bug 23463] Move C4::Items CRUD subroutines to Koha::Item -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29794 --- Comment #7 from Fridolin Somers <fridolin.somers@biblibre.com> --- Bug 23463 replaced DelItemCheck() with Koha::Items->find() and $item->safe_delete It should have impact the includes -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29794 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |22.05.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=29794 --- Comment #8 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to master for 22.05, thanks to everybody involved 🦄 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29794 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|22.05.00 |22.05.00,21.11.02 released in| | Status|Pushed to master |Pushed to stable CC| |kyle@bywatersolutions.com --- Comment #9 from Kyle M Hall <kyle@bywatersolutions.com> --- Pushed to 21.11.x for 21.11.02 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29794 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED CC| |andrew@bywatersolutions.com Status|Pushed to stable |RESOLVED --- Comment #10 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- I can't recreate this issue on 21.05.x. Following the test plan, I get the correct message of "Item '1' not deleted: book_on_loan" without the patch applied. Not backporting, please request if needed. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org