Bug 36227

Summary: No warning if placing hold on item group with no items
Product: Koha Reporter: hebah
Component: Hold requestsAssignee: Lucas Gass (lukeg) <lucas>
Status: Pushed to oldstable --- QA Contact: Emily Lamancusa (emlam) <emily.lamancusa>
Severity: normal    
Priority: P5 - low CC: emily.lamancusa, fridolin.somers, gmcharlt, lucas, mnero
Version: Main   
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:
24.05.00,23.11.06,23.05.12
Circulation function:
Bug Depends on:    
Bug Blocks: 34823    
Attachments: Bug 36227: Add warning when item group has no holdable items
Bug 36227: Remove item group option if there are no items
Bug 36227: Add warning when item group has no holdable items
Bug 36227: Remove item group option if there are no items
Bug 36227: Add warning when item group has no holdable items
Bug 36227: Remove item group option if there are no items
Bug 36227: Add warning when item group has no holdable items
Bug 36227: Remove item group option if there are no items

Description hebah 2024-03-04 20:15:51 UTC
It is currently possible to place a group-level hold on an item group with no items in it, both from the staff client and OPAC. This results in a hold that is not fillable unless the item group is deleted or an item is added into it. A warning would be helpful so patrons aren't left with an unfillable hold.
Comment 1 Lucas Gass (lukeg) 2024-03-06 00:07:42 UTC
Created attachment 162806 [details] [review]
Bug 36227: Add warning when item group has no holdable items

To test:
1. Enable EnableItemGroups and EnableItemGroupHolds
2. Find a bib and add an item group but do not attach any items to the item group.
3. Place a hold from the staff interface.
4. Under  Hold next available item from an item group you see the option for your item group, select it and place the hold.
5. It's a hold that can not be filled
6. APPLY PATCH
7. How on the hold page under  Hold next available item from an item group there is a 3rd column called 'Holdable items'.
8. Your item group, without any items, should have a disabled radio button and a warning "No holdable items in this item group."
9. Add items to your item group.
10. Now on the hold page in the new 'Holdable items' you should see links for each item, make sure those links work.
Comment 2 Lucas Gass (lukeg) 2024-03-06 00:34:09 UTC
Created attachment 162807 [details] [review]
Bug 36227: Remove item group option if there are no items

To test:
1. Test from OPAC. Any item group without items in it should not display as an option in the "Request specific item group:" dropdown
Comment 3 Caroline Cyr La Rose 2024-03-06 19:10:10 UTC
Created attachment 162851 [details] [review]
Bug 36227: Add warning when item group has no holdable items

To test:
1. Enable EnableItemGroups and EnableItemGroupHolds
2. Find a bib and add an item group but do not attach any items to the item group.
3. Place a hold from the staff interface.
4. Under  Hold next available item from an item group you see the option for your item group, select it and place the hold.
5. It's a hold that can not be filled
6. APPLY PATCH
7. How on the hold page under  Hold next available item from an item group there is a 3rd column called 'Holdable items'.
8. Your item group, without any items, should have a disabled radio button and a warning "No holdable items in this item group."
9. Add items to your item group.
10. Now on the hold page in the new 'Holdable items' you should see links for each item, make sure those links work.

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Comment 4 Caroline Cyr La Rose 2024-03-06 19:10:12 UTC
Created attachment 162852 [details] [review]
Bug 36227: Remove item group option if there are no items

To test:
1. Test from OPAC. Any item group without items in it should not display as an option in the "Request specific item group:" dropdown

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Comment 5 Emily Lamancusa (emlam) 2024-03-22 20:52:08 UTC
Patch does not apply (probably needs to be rebased on top of 34478)
Comment 6 Lucas Gass (lukeg) 2024-03-27 17:47:20 UTC
Created attachment 164019 [details] [review]
Bug 36227: Add warning when item group has no holdable items

To test:
1. Enable EnableItemGroups and EnableItemGroupHolds
2. Find a bib and add an item group but do not attach any items to the item group.
3. Place a hold from the staff interface.
4. Under  Hold next available item from an item group you see the option for your item group, select it and place the hold.
5. It's a hold that can not be filled
6. APPLY PATCH
7. How on the hold page under  Hold next available item from an item group there is a 3rd column called 'Holdable items'.
8. Your item group, without any items, should have a disabled radio button and a warning "No holdable items in this item group."
9. Add items to your item group.
10. Now on the hold page in the new 'Holdable items' you should see links for each item, make sure those links work.

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Comment 7 Lucas Gass (lukeg) 2024-03-27 17:47:22 UTC
Created attachment 164020 [details] [review]
Bug 36227: Remove item group option if there are no items

To test:
1. Test from OPAC. Any item group without items in it should not display as an option in the "Request specific item group:" dropdown

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Comment 8 Lucas Gass (lukeg) 2024-03-27 17:47:51 UTC
Rebased for current master.
Comment 9 Emily Lamancusa (emlam) 2024-03-27 19:26:50 UTC
Created attachment 164030 [details] [review]
Bug 36227: Add warning when item group has no holdable items

To test:
1. Enable EnableItemGroups and EnableItemGroupHolds
2. Find a bib and add an item group but do not attach any items to the item group.
3. Place a hold from the staff interface.
4. Under  Hold next available item from an item group you see the option for your item group, select it and place the hold.
5. It's a hold that can not be filled
6. APPLY PATCH
7. How on the hold page under  Hold next available item from an item group there is a 3rd column called 'Holdable items'.
8. Your item group, without any items, should have a disabled radio button and a warning "No holdable items in this item group."
9. Add items to your item group.
10. Now on the hold page in the new 'Holdable items' you should see links for each item, make sure those links work.

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Comment 10 Emily Lamancusa (emlam) 2024-03-27 19:26:52 UTC
Created attachment 164031 [details] [review]
Bug 36227: Remove item group option if there are no items

To test:
1. Test from OPAC. Any item group without items in it should not display as an option in the "Request specific item group:" dropdown

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Comment 11 Katrin Fischer 2024-04-04 13:25:30 UTC
Pushed for 24.05!

Well done everyone, thank you!
Comment 12 Fridolin Somers 2024-05-23 09:05:21 UTC
Pushed to 23.11.x for 23.11.06
Comment 13 Lucas Gass (lukeg) 2024-05-28 16:21:04 UTC
Backported to 23.05.x for upcoming 23.05.12