Bug 33698

Summary: Add fields to verbose output of cronjob delete_items.pl
Product: Koha Reporter: Laura Escamilla <Laura.escamilla>
Component: Command-line UtilitiesAssignee: Laura Escamilla <Laura.escamilla>
Status: RESOLVED FIXED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: caroline.cyr-la-rose, martin.renvoize, robin
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Caroline Cyr La Rose Documentation submission: https://gitlab.com/koha-community/koha-manual/-/merge_requests/800
Text to go in the release notes:
Version(s) released in:
23.11.00
Circulation function:
Attachments: Bug 33698: Add fields to the verbose output that show the barcode and title of items that cannot be deleted
Bug 33698: Added fields to the verbose output
Bug 33698: Added fields to the verbose output
Bug 33698: Added fields to the verbose output
Bug 33698: Add fields to the verbose output that show the barcode and title of items that cannot be deleted
Bug 33698: Add fields to the verbose output that show the barcode and title of items that cannot be deleted
Bug 33698: Add fields to the verbose output that show the barcode and title of items that cannot be deleted

Description Laura Escamilla 2023-05-08 20:24:41 UTC
Currently the log for delete_items.pl only shows the item numbers for items that could not be deleted. It would be useful to also show the item's barcode and title information for easier searching.
Comment 1 Laura Escamilla 2023-05-30 18:47:49 UTC
Created attachment 151823 [details] [review]
Bug 33698: Add fields to the verbose output that show the barcode and title of items that cannot be deleted
Comment 2 Laura Escamilla 2023-05-30 18:48:23 UTC
Test Plan:

1. Checkout an item to a patron.
2. Mark that item as withdrawn.
3. Run misc/cronjobs/deleted_items.pl
4. Confirm that no barcode or title are shown.
5. Apply patch and restart services
6. Run the cron again.
7. Confirm that the barcode and title of the item withdrawn are shown and correct. 
8. Sign off!
Comment 3 Laura Escamilla 2023-05-30 20:50:10 UTC Comment hidden (obsolete)
Comment 4 Laura Escamilla 2023-05-30 20:51:43 UTC Comment hidden (obsolete)
Comment 5 Laura Escamilla 2023-05-30 20:55:04 UTC
Created attachment 151848 [details] [review]
Bug 33698: Added fields to the verbose output

Test Plan:

1. Checkout an item to a patron.
2. Mark that item as withdrawn.
3. Run perl misc/cronjobs/delete_items.pl --where "items.withdrawn != 0" --where "items.withdrawn_on <= ‘xxxx-xx-xx’” --verbose --commit (in the x’s you’ll put the year-month-date for tomorrow)
4. Confirm that no barcode or title are shown.
5. Apply patch and restart services
6. Run the cron again.
7. Confirm that the barcode and title of the item withdrawn are shown and correct. 
8. Sign off!
Comment 6 Laura Escamilla 2023-05-30 21:18:55 UTC
Created attachment 151849 [details] [review]
Bug 33698: Add fields to the verbose output that show the barcode and title of items that cannot be deleted
Comment 7 Laura Escamilla 2023-05-30 21:22:40 UTC
Fixed test plan: 

Test Plan:

1. Checkout an item to a patron.
2. Mark that item as withdrawn.
3. Run perl misc/cronjobs/delete_items.pl --where "items.withdrawn != 0" --where "items.withdrawn_on <= 'xxxx-xx-xx'" --verbose --commit
 (in the x’s you’ll put the year-month-date for tomorrow)
4. Confirm that no barcode or title are shown.
5. Apply patch and restart services
6. Run the cron again.
7. Confirm that the barcode and title of the item withdrawn are shown and correct. 
8. Sign off!
Comment 8 Sam Lau 2023-05-31 14:39:11 UTC
Created attachment 151883 [details] [review]
Bug 33698: Add fields to the verbose output that show the barcode and title of items that cannot be deleted

Signed-off-by: Sam Lau <samalau@gmail.com>
Comment 9 Katrin Fischer 2023-06-09 09:58:22 UTC
Created attachment 152234 [details] [review]
Bug 33698: Add fields to the verbose output that show the barcode and title of items that cannot be deleted

Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 10 Tomás Cohen Arazi (tcohen) 2023-06-09 11:50:32 UTC
Pushed to master for 23.11.

Nice work everyone, thanks!
Comment 11 Martin Renvoize (ashimema) 2023-07-12 08:22:53 UTC
Enhancement, choosing not to backport.