[Koha-bugs] [Bug 27819] Spurious errors when running delete_records_via_leader.pl

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Sat Feb 27 18:49:17 CET 2021


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27819

--- Comment #1 from Nick Clemens <nick at bywatersolutions.com> ---
Created attachment 117406
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=117406&action=edit
Bug 27819: Spurious item deletion errors from delete_records_via_leader.pl

The job reports errors when deleting items.

The issue seems to be that Koha::Object->delete claims in the POD to return -1,
0, or 1 as a result, but it in fact returns the Object itself on a successful
deletion

The errors are reported as:
ERROR DELETING ITEM 501740: Koha::Item=HASH(0x55ce407a1a78)

To recreate:
 1 - Find or create a record with some items
 2 - Ensure those  items can be deleted (not on loan, etc.)
 3 - Edit the record leader and set position 5 to 'd'
 4 - perl misc/cronjobs/delete_records_via_leader.pl -i -v --confirm
 5 - Deletion succeeds, but reports failure on items
 6 - Apply patch
 7 - Find or create a new record as above, but this time add an additional item
and check it out to a patron
 8 - perl misc/cronjobs/delete_records_via_leader.pl -i -v
 9 - Test mode should report 1 item to be deleted, one with error
10 - perl misc/cronjobs/delete_records_via_leader.pl -i -v --confirm
11 - One item should be deleted, one item not, record not deleted
12 - check the item in
13 - perl misc/cronjobs/delete_records_via_leader.pl -i -v --confirm
14 - Successful deletion with no error reported

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.


More information about the Koha-bugs mailing list