Bug 29797

Summary: Background job detail for batch delete items not listing the itemnumbers
Product: Koha Reporter: Jonathan Druart <jonathan.druart>
Component: ToolsAssignee: Jonathan Druart <jonathan.druart>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: andrewfh, fridolin.somers, kyle, martin.renvoize
Version: unspecified   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
22.05.00,21.11.03
Bug Depends on: 28445    
Bug Blocks:    
Attachments: Bug 29797: Fix display of itemnumbers on the background job detail view
Bug 29797: Fix display of itemnumbers on the background job detail view
Bug 29797: Fix display of itemnumbers on the background job detail view
Bug 29797: Fix display of itemnumbers on the background job detail view

Description Jonathan Druart 2022-01-05 09:38:20 UTC
If some items have not been deleted, the detail view of the background job will display "1 item(s) could not be deleted: ", without the list of itemnumbers.
Comment 1 Jonathan Druart 2022-01-05 09:41:13 UTC
Created attachment 129019 [details] [review]
Bug 29797: Fix display of itemnumbers on the background job detail view

If some items have not been deleted, the detail view of the background job will display "1 item(s) could not be deleted: ", without the list of itemnumbers.

Test plan:
1. Check an item out
2. Use the batch delete items tool to delete the item that is checked
out and another one.
3. On the confirmation view, use the dev tool of your browser to remove
the "disabled" property of the disabled checkbox and select both
items.
4. Submit
5. Go to the detail view of the background job and confirm that you see
the itemnumber of the item that has failed to be deleted
Comment 2 Fridolin Somers 2022-01-18 19:04:48 UTC
Created attachment 129588 [details] [review]
Bug 29797: Fix display of itemnumbers on the background job detail view

If some items have not been deleted, the detail view of the background job will display "1 item(s) could not be deleted: ", without the list of itemnumbers.

Test plan:
1. Check an item out
2. Use the batch delete items tool to delete the item that is checked
out and another one.
3. On the confirmation view, use the dev tool of your browser to remove
the "disabled" property of the disabled checkbox and select both
items.
4. Submit
5. Go to the detail view of the background job and confirm that you see
the itemnumber of the item that has failed to be deleted

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Comment 3 Fridolin Somers 2022-01-18 19:05:50 UTC
Created attachment 129589 [details] [review]
Bug 29797: Fix display of itemnumbers on the background job detail view

If some items have not been deleted, the detail view of the background job will display "1 item(s) could not be deleted: ", without the list of itemnumbers.
Also add a space character between itemnumbers.

Test plan:
1. Check an item out
2. Use the batch delete items tool to delete the item that is checked
out and another one.
3. On the confirmation view, use the dev tool of your browser to remove
the "disabled" property of the disabled checkbox and select both
items.
4. Submit
5. Go to the detail view of the background job and confirm that you see
the itemnumber of the item that has failed to be deleted

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Comment 4 Fridolin Somers 2022-01-18 19:08:43 UTC
> Also add a space character between itemnumbers.
I tested with 2 items impossible to delete and notices that itemnumbers do not have a separator.
Very small fix so I made it will signing.

BTW :
Do we even need this itemnumber list ?
It is not clear for user that those are itemnumbers and not barcodes.
We have a message for each item in "Detailed messages".
Comment 5 Martin Renvoize 2022-01-19 11:00:56 UTC
Created attachment 129599 [details] [review]
Bug 29797: Fix display of itemnumbers on the background job detail view

If some items have not been deleted, the detail view of the background job will display "1 item(s) could not be deleted: ", without the list of itemnumbers.
Also add a space character between itemnumbers.

Test plan:
1. Check an item out
2. Use the batch delete items tool to delete the item that is checked
out and another one.
3. On the confirmation view, use the dev tool of your browser to remove
the "disabled" property of the disabled checkbox and select both
items.
4. Submit
5. Go to the detail view of the background job and confirm that you see
the itemnumber of the item that has failed to be deleted

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 6 Martin Renvoize 2022-01-19 11:02:00 UTC
Good catch, works as described now.

I agree, itemnumbers may not be the best thing to output.. but trying to output something more meaningful to the end-user may well result in gaps.. itemnumber is definitively going to be defined.

Passing QA
Comment 7 Fridolin Somers 2022-01-22 07:40:50 UTC
Pushed to master for 22.05, thanks to everybody involved 🦄
Comment 8 Kyle M Hall 2022-02-07 11:59:53 UTC
Pushed to 21.11.x for 21.11.03
Comment 9 Andrew Fuerste-Henry 2022-02-21 14:47:17 UTC
Missing dependency, not backported to 21.05