When EnableItemGroupHolds is activated, there is a "Request specific item group:" drop-down in the OPAC when placing a hold. However, this drop-down appears regardless of whether the record has item groups or not. I think this may be confusing for patrons. To replicate: 1. Enable EnableItemGroups and EnableItemGroupHolds 2. Go to the OPAC and log in as a patron 3. Go to any record that doesn't have grouped items and try to place a hold 4. Click on "Show more options" --> Note that there is an option to choose an item group with the only option being "Any item group"
Created attachment 162847 [details] [review] Bug 34823: Do not show Item group dropdown if there are no item groups To test: 1. Enable EnableItemGroups and EnableItemGroupHolds 2. Go to the OPAC and log in as a patron 3. Go to any record that doesn't have grouped items and try to place a hold 4. Click on "Show more options" 5. See "Request specific item group:" and dropdown 6. APPLY PATCH 7. Try again, this time if the record has no item groups you should not see the dropdown at all.
Created attachment 162850 [details] [review] Bug 34823: Do not show Item group dropdown if there are no item groups To test: 1. Enable EnableItemGroups and EnableItemGroupHolds 2. Go to the OPAC and log in as a patron 3. Go to any record that doesn't have grouped items and try to place a hold 4. Click on "Show more options" 5. See "Request specific item group:" and dropdown 6. APPLY PATCH 7. Try again, this time if the record has no item groups you should not see the dropdown at all. Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Thanks Lucas!
Moving this to BLOCKED for now, since the dependent patch does not apply.
There's also an edge case when a record has item groups defined, but all of the item groups are empty. Could this fix be adjusted to cover that case too? Maybe by filtering the search itself to exclude empty item groups, and bumping it up in the code a bit?
(In reply to Emily Lamancusa from comment #5) > There's also an edge case when a record has item groups defined, but all of > the item groups are empty. Could this fix be adjusted to cover that case > too? Maybe by filtering the search itself to exclude empty item groups, and > bumping it up in the code a bit? I must be missing something because I thought that is what this patch is correcting.
(In reply to Lucas Gass from comment #6) > (In reply to Emily Lamancusa from comment #5) > > There's also an edge case when a record has item groups defined, but all of > > the item groups are empty. Could this fix be adjusted to cover that case > > too? Maybe by filtering the search itself to exclude empty item groups, and > > bumping it up in the code a bit? > > I must be missing something because I thought that is what this patch is > correcting. It corrects the usual case, where a record has no item groups at all. To replicate what I'm seeing: 1. Apply the patch 2. On the intranet, find a record with no item groups 3. Add one or more item groups to that record (Do not add any items to the item group(s)) 4. On the OPAC, go to that record and try to place a hold --> Note that there is an option to choose an item group with the only option being "Any item group" I can't think of a reason this state would exist except in error, so if this is not as easy to address as I'm imagining, then I don't think it needs to be a blocker. But if this case can be covered by making something like a three-line change as opposed to a one-line change, then I'd rather go with the more robust fix the first time around.
Created attachment 166610 [details] [review] Bug 34823: Do not show Item group dropdown if there are no item groups To test: 1. Enable EnableItemGroups and EnableItemGroupHolds 2. Go to the OPAC and log in as a patron 3. Go to any record that doesn't have grouped items and try to place a hold 4. Click on "Show more options" 5. See "Request specific item group:" and dropdown 6. APPLY PATCH 7. Try again, this time if the record has no item groups you should not see the dropdown at all. Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Pushed for 24.05! Well done everyone, thank you!
Pushed to 23.11.x for 23.11.06
Backported to 23.05.x for upcoming 23.05.12