Bug 28255 - Follow up to bug 23463 - use item_object in misc/cronjobs/delete_items.pl
Summary: Follow up to bug 23463 - use item_object in misc/cronjobs/delete_items.pl
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Command-line Utilities (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Nick Clemens
QA Contact: Testopia
URL:
Keywords:
Depends on: 23463
Blocks:
  Show dependency treegraph
 
Reported: 2021-04-28 17:57 UTC by Nick Clemens
Modified: 2021-05-26 08:06 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Text to go in the release notes:
Version(s) released in:
21.05.00,20.11.06,20.05.12


Attachments
Bug 28255: Follow up to bug 23463 - use item_object in misc/cronjobs/delete_items.pl (1.33 KB, patch)
2021-04-28 18:00 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 28255: Follow up to bug 23463 - use item_object in misc/cronjobs/delete_items.pl (1.38 KB, patch)
2021-05-12 20:14 UTC, David Nind
Details | Diff | Splinter Review
Bug 28255: Follow up to bug 23463 - use item_object in misc/cronjobs/delete_items.pl (1.45 KB, patch)
2021-05-18 12:16 UTC, Kyle M Hall
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Clemens 2021-04-28 17:57:39 UTC

    
Comment 1 Nick Clemens 2021-04-28 18:00:02 UTC
Created attachment 120280 [details] [review]
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
Comment 2 David Nind 2021-05-12 20:14:10 UTC
Created attachment 120904 [details] [review]
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

Signed-off-by: David Nind <david@davidnind.com>
Comment 3 Kyle M Hall 2021-05-18 12:16:36 UTC
Created attachment 121107 [details] [review]
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

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 4 Jonathan Druart 2021-05-19 13:08:17 UTC
Pushed to master for 21.05, thanks to everybody involved!
Comment 5 Fridolin Somers 2021-05-20 12:54:15 UTC
Pushed to 20.11.x for 20.11.06
Comment 6 Andrew Fuerste-Henry 2021-05-25 14:22:59 UTC
Pushed to 20.05.x for 20.05.12
Comment 7 Victor Grousset/tuxayo 2021-05-26 08:06:23 UTC
Missing dependencies for 19.11.x, no backport.