Bug 29148

Summary: Holds to Pull doesn't reflect item-level holds
Product: Koha Reporter: Andrew Fuerste-Henry <andrewfh>
Component: Hold requestsAssignee: Lucas Gass <lucas>
Status: CLOSED FIXED QA Contact: Tomás Cohen Arazi <tomascohen>
Severity: major    
Priority: P5 - low CC: azucena.aguayo, fridolin.somers, gmcharlt, kyle, lucas, tomascohen
Version: master   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
21.11.00,21.05.05
Bug Depends on: 24488    
Bug Blocks: 29161, 29786    
Attachments: Bug 29148: Check reserves.item_level_hold in Holds to Pull
Bug 29148: Check if hold is item or bib level
Bug 29148: Check if hold is item or bib level
Bug 29148: Check if hold is item or bib level

Description Andrew Fuerste-Henry 2021-09-30 18:16:47 UTC
To test:
- have an item with multiple copies
- place an item-level hold on one of the copies
- go to Holds to Pull (/cgi-bin/koha/circ/pendingreserves.pl)
- confirm it shows "[one of the barcodes] or any available" when it should show specifically the barcode of the item on which your hold was placed and should not show "or any available"
Comment 1 Andrew Fuerste-Henry 2021-09-30 18:23:51 UTC Comment hidden (obsolete)
Comment 2 Andrew Fuerste-Henry 2021-09-30 18:25:24 UTC
I'm honestly not sure why the existing code started to fail here, but I changed it to check for item_level_hold=1, rather than presence of an itemnumber. It seems like a more reliable check anyway.
Comment 3 Azucena Aguayo 2021-09-30 20:00:28 UTC
Patch solves the item-level hold issue.

However, patch breaks title-level hold barcode display.

To test:
- have an 2 records with multiple copies
- place an item-level hold on one of the copies for record A
- place a title-level hold for record B
- go to Holds to Pull (/cgi-bin/koha/circ/pendingreserves.pl)
- confirm it shows "only barcode" on BOTH holds when it should show specifically the barcode of one item on the hold for record A, but show the same on the title hold for record B.
Comment 4 Lucas Gass 2021-09-30 22:16:12 UTC Comment hidden (obsolete)
Comment 5 Biblibre Sandboxes 2021-09-30 23:28:40 UTC
Created attachment 125573 [details] [review]
Bug 29148: Check if hold is item or bib level

To test:
1 - place an item level hold, it says: [one of the barcodes] or any available
2 - place a bib level hold, it says: [one of the barcodes] or any available
3 - Apply patch
4 - item level hold should say: Only [barcode]
5 - bib level hold should say: [one of the barcodes] or any available

Signed-off-by: Azucena <Azucena.Aguayo@uvu.edu>
Comment 6 Joonas Kylmälä 2021-10-03 09:02:16 UTC
Created attachment 125664 [details] [review]
Bug 29148: Check if hold is item or bib level

To test:
1 - place an item level hold, it says: [one of the barcodes] or any available
2 - place a bib level hold, it says: [one of the barcodes] or any available
3 - Apply patch
4 - item level hold should say: Only [barcode]
5 - bib level hold should say: [one of the barcodes] or any available

Signed-off-by: Azucena <Azucena.Aguayo@uvu.edu>

Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Comment 7 Jonathan Druart 2021-10-06 08:38:53 UTC
Pushed to master for 21.11, thanks to everybody involved!
Comment 8 Kyle M Hall 2021-10-08 13:56:51 UTC
Pushed to 21.05.x for 21.05.05
Comment 9 Fridolin Somers 2021-10-21 04:09:00 UTC
Depends on Bug 24488 not in 20.11.x