Bug 21528

Summary: Combine all reserves in a biblio hold-group into a single line entry
Product: Koha Reporter: Alex Buckley <alexbuckley>
Component: Hold requestsAssignee: Aleisha Amohia <aleisha>
Status: ASSIGNED --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: gmcharlt, josef.moravec
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 15516    
Bug Blocks:    
Attachments: Bug 21528: Display reserves in hold_group as single row in template
Bug 21528: Display reserves in hold_group as single row in template
Bug 21528: Single line for hold groups in intranet side
Bug 21528: Single line for hold groups in intranet side
Bug 21528: UNFINISHED PATCH
Bug 21528: UNFINISHED PATCH

Description Alex Buckley 2018-10-10 00:40:12 UTC
Building on the 'reserve next available from a group' functionality implemented in bug 15516 the patches attached to this bug report should combine all the reserves in a hold-group on a biblio into a single line entry on the following interfaces:

* reserve/request.pl
* Reserves tab in the circ/circulation.pl
* members/moremember.pl

This will make the reserve queue display manageable and not too overly long
Comment 1 Alex Buckley 2018-10-10 00:41:52 UTC
Created attachment 80317 [details] [review]
Bug 21528: Display reserves in hold_group as single row in template
Comment 2 Alex Buckley 2018-10-10 01:39:43 UTC
Created attachment 80319 [details] [review]
Bug 21528: Display reserves in hold_group as single row in template

Sponsored-By: Brimbank library, Australia
Comment 3 Alex Buckley 2018-10-11 05:23:00 UTC
Created attachment 80376 [details] [review]
Bug 21528: Single line for hold groups in intranet side

Sponsored-By: Brimbank Library, Australia
Comment 4 Alex Buckley 2018-10-12 02:23:23 UTC
Created attachment 80443 [details] [review]
Bug 21528: Single line for hold groups in intranet side

Sponsored-By: Brimbank Library, Australia
Comment 5 Aleisha Amohia 2019-04-16 05:10:06 UTC
Created attachment 88042 [details] [review]
Bug 21528: UNFINISHED PATCH
Comment 6 Aleisha Amohia 2019-04-17 01:16:26 UTC
Created attachment 88124 [details] [review]
Bug 21528: UNFINISHED PATCH
Comment 7 David Cook 2020-12-18 04:47:39 UTC
Comment on attachment 88124 [details] [review]
Bug 21528: UNFINISHED PATCH

Review of attachment 88124 [details] [review]:
-----------------------------------------------------------------

::: svc/holds
@@ +103,2 @@
>          itemtype_limit => $itemtype_limit,
> +        hold_group     => Koha::Holds->search({ hold_group_id => $h->hold_group_id })->unblessed,

This is buggy. I'd suggest changing it to the following:
( $h->hold_group_id ) ? Koha::Holds->search({ hold_group_id => $h->hold_group_id })->unblessed : undef

If the hold doesn't have a hold group ID, all holds without a hold_group_id will be fetched. 

If a borrower has a high number of holds, and there are a high number of holds on the system, you'll be fetching and then transmitting a huge amount of data (the magnitude being megabytes instead of kilobytes). This uses up a lot of system memory and creates huge latency.