]> git.koha-community.org Git - koha.git/commit
Bug 32656: Script delete_records_via_leader.pl no longer deletes items
authorKyle Hall <kyle@bywatersolutions.com>
Tue, 17 Jan 2023 17:18:00 +0000 (12:18 -0500)
committerLucas Gass <lucas@bywatersolutions.com>
Wed, 1 Feb 2023 15:36:41 +0000 (15:36 +0000)
commit0f430ce9a8c3b98be260e48a3d66f5bbb40012ab
tree673840a58f72c747f77ffe107901c61c7e7f38d2
parentcb5f3095c29e0643bf9e1a3b841cc22a2fb0b023
Bug 32656: Script delete_records_via_leader.pl no longer deletes items

Bug 29788 inadvertantly replaced a call to safe_delete() with safe_to_delete()
such that any time the script should delete an item it only checks to see if
the item is delectable, after which deletion of the record fails because the
items were not deleted.

Test Plan:
1) Mark a record with items to be deleted via the record leader
2) Run delete_records_via_leader.pl -i -b -v
3) Note the script says it is deleting the items but then the record
   deletion fails. Note the items remain in the items table of the
   database.
4) Apply this patch
5) Repeat step 2
6) This time the items and record should be deleted!

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 790f00781ab6c98017529ebf226d52c36c36cd68)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit 03a9b139587aea26a9abde4f45a7c4f99532353c)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
misc/cronjobs/delete_records_via_leader.pl