Bug 28353

Summary: Regression: Batch item deletion no longer shows which items were not removed
Product: Koha Reporter: Donna <bwsdonna>
Component: ToolsAssignee: Jonathan Druart <jonathan.druart+koha>
Status: RESOLVED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: david, fridolin.somers, jonathan.druart+koha, lisetteslatah, lnilsson, victor
Version: unspecifiedKeywords: Manual
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Text to go in the release notes:
This restores and improves the messages displayed when batch deleting items (Tools > Catalog > Batch item deletion). The messages displayed are: - "Warning, the following barcodes were not found:", followed by a list of barcodes - "Warning, the following items cannot be deleted:", followed by a list of barcodes
Version(s) released in:
21.11.00,21.05.01,20.11.07
Bug Depends on: 8132    
Bug Blocks:    
Attachments: Bug 28353: Display a list of items that cannot be deleted
Bug 28353: Display a list of items that cannot be deleted
Bug 28353: Display a list of items that cannot be deleted

Description Donna 2021-05-13 21:47:00 UTC
In 19.11 when using the batch item deletion tool, the confirmation screen included the total number of items and bibs deleted, and listed the items that could not be deleted, such as if they were checked out, etc.

In 20.05 the user only sees the number of items and bibs deleted and no message that items in the batch were not deleted.  

The results page should show a list of items in the batch that were not able to be deleted.
Comment 1 LeeAnn Nilsson 2021-05-14 20:51:24 UTC
This is a big problem for our libraries.  I do cataloging for multiple libraries and librarians send me large lists of barcodes to delete.  The new feature is not efficient.  When I use this tool, I need the warnings on the results page to say which barcodes were not deleted and why, so I can refer those items back to the librarians to follow up on.  Thanks, LeeAnn
Comment 2 Lisette Scheer 2021-05-14 20:51:52 UTC
(In reply to Donna from comment #0)
 
> The results page should show a list of items in the batch that were not able
> to be deleted.

+1 This would be much more helpful than the current setup. 

Lisette
Comment 3 Jonathan Druart 2021-05-18 07:44:49 UTC
Created attachment 121089 [details] [review]
Bug 28353: Display a list of items that cannot be deleted

We used to display a list of items that cannot be deleted (checked out
or on hold) on the Batch item deletion tool.
With bug 8132 we improve the error handling, but the info is spread in
the table.

This patch adds, at the top of the page, the list of items (barcode)
that cannot be removed.
Comment 4 Jonathan Druart 2021-05-18 07:45:38 UTC
With this patch I get: https://snipboard.io/phjBsA.jpg

Would that work for you?
Comment 5 LeeAnn Nilsson 2021-05-18 18:09:15 UTC
Yes that is helpful.  Thanks
Comment 6 Katrin Fischer 2021-05-24 16:07:18 UTC
(In reply to LeeAnn Nilsson from comment #5)
> Yes that is helpful.  Thanks

Hi Leann, would you be able to sign this off? The sandboxes should work in this case and we just updated the instructions :) 

https://wiki.koha-community.org/wiki/Sandboxes

Also happy to help if you have any questions.
Comment 7 David Nind 2021-05-29 00:51:45 UTC
Created attachment 121504 [details] [review]
Bug 28353: Display a list of items that cannot be deleted

We used to display a list of items that cannot be deleted (checked out
or on hold) on the Batch item deletion tool.
With bug 8132 we improve the error handling, but the info is spread in
the table.

This patch adds, at the top of the page, the list of items (barcode)
that cannot be removed.

Signed-off-by: David Nind <david@davidnind.com>
Comment 8 David Nind 2021-05-29 01:06:14 UTC
Testing notes (using koha-testing-docker).

Test plan:
1. Place a hold for an item and note the barcode
2. Check out an item and note the barcode
3. Go to the batch delete item tool (Tools > Catalog > Batch item deletion) 
   and in the barcode list enter:
   . The barcodes from step 1 and 2
   . An invalid barcode (such as 'XYZ'), 
   . A barcode for an item that can be deleted (= not checked out, not on hold)
   and click 'Continue'
5. The batch item deletion page will show this message:
   . 'Warning, the following barcodes were not found:", followed by a list of barcodes
   (it should list the invalid barcode entered in step 3)
6. Select all the items and click 'Delete selected items'
7. The message says: '1 item(s) deleted'
8. Apply the patch
9. Repeat step 3:
10. The batch item deletion page will show these messages:
    . 'Warning, the following barcodes were not found:", followed by a list of barcodes
    - "Warning, the following items cannot be deleted:", followed by a list of barcodes
11. Click 'Delete selected items", the resulting mesage says '1 item(s) deleted'
12. Sign off!
Comment 9 Katrin Fischer 2021-06-03 10:46:08 UTC
Created attachment 121577 [details] [review]
Bug 28353: Display a list of items that cannot be deleted

We used to display a list of items that cannot be deleted (checked out
or on hold) on the Batch item deletion tool.
With bug 8132 we improve the error handling, but the info is spread in
the table.

This patch adds, at the top of the page, the list of items (barcode)
that cannot be removed.

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 10 Jonathan Druart 2021-06-14 14:22:12 UTC Comment hidden (obsolete)
Comment 11 Jonathan Druart 2021-06-14 14:23:02 UTC
Pushed to master for 21.11, thanks to everybody involved!
Comment 12 Fridolin Somers 2021-06-21 12:30:02 UTC
Pushed to 21.05.x for 21.05.01
Comment 13 Fridolin Somers 2021-06-21 12:30:18 UTC
Pushed to 20.11.x for 20.11.07
Comment 14 Victor Grousset/tuxayo 2021-06-22 00:57:13 UTC
Not backported to oldoldstable (20.05.x). Feel free to ask if it's needed.