Bugzilla – Attachment 120280 Details for
Bug 28255
Follow up to bug 23463 - use item_object in misc/cronjobs/delete_items.pl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28255: Follow up to bug 23463 - use item_object in misc/cronjobs/delete_items.pl
Bug-28255-Follow-up-to-bug-23463---use-itemobject-.patch (text/plain), 1.33 KB, created by
Nick Clemens (kidclamp)
on 2021-04-28 18:00:02 UTC
(
hide
)
Description:
Bug 28255: Follow up to bug 23463 - use item_object in misc/cronjobs/delete_items.pl
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2021-04-28 18:00:02 UTC
Size:
1.33 KB
patch
obsolete
>From 9401ec931c697d87b372496736caeae45997c51a Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Wed, 28 Apr 2021 17:56:11 +0000 >Subject: [PATCH] Bug 28255: Follow up to bug 23463 - use item_object in > misc/cronjobs/delete_items.pl > >This looks like just an assumption that the $item variable was an object > >Correct the code to use $item_object > >To test: >1 - perl misc/cronjobs/delete_items.pl -where="barcode LIKE '%8'" --commit --verbose >2 - Can't call method "safe_delete" on unblessed reference at /usr/share/koha/bin/cronjobs/delete_items.pl line 67. >3 - Apply patch >4 - Repeat >5 - Success! You deleted a bunch of items >--- > misc/cronjobs/delete_items.pl | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/misc/cronjobs/delete_items.pl b/misc/cronjobs/delete_items.pl >index 5ca182daf1..df5d23aa66 100755 >--- a/misc/cronjobs/delete_items.pl >+++ b/misc/cronjobs/delete_items.pl >@@ -63,7 +63,7 @@ DELITEM: while ( my $item = $GLOBAL->{sth}->{target_items}->fetchrow_hashref() ) > my $item_object = Koha::Items->find($item->{itemnumber}); > my $safe_to_delete = $item_object->safe_to_delete; > if( $safe_to_delete eq '1' ) { >- $item->safe_delete >+ $item_object->safe_delete > if $OPTIONS->{flags}->{commit}; > verbose "Deleting '$item->{itemnumber}'"; > } else { >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 28255
:
120280
|
120904
|
121107