From b1628a56a0bc2e02340a9bb2d7af7736b33a16a5 Mon Sep 17 00:00:00 2001 From: Lucas Gass Date: Fri, 6 Oct 2023 15:15:39 +0000 Subject: [PATCH] Bug 35003: Make cancelled hold requests filter by branch To recreate: 1. Make sure you have the "Default waiting hold cancellation policy" set to allow via circulation rules. 2. Make several holds at different branches holds and set them to waiting 3. Request to cancel those holds, making sure you cancel some for different branches. 4. Go to waitingreserves.tt and notice that you see all of the holds from all branches. 5. APPLY PATCH and restart services 6. Vist the waitingreserves.tt page and notice that the "Holds with cancellation requests" table can now filters by branch. 7. Use the "View all libraries" and make sure you can see all the holds with a cancellation request. Signed-off-by: David Nind Signed-off-by: Marcel de Rooy (cherry picked from commit 67f4fcc204c11998f9110d8ed723fa826c62a5ce) Signed-off-by: Fridolin Somers (cherry picked from commit cb99c788f7c581b148a872c9ed3dcb013c369796) Signed-off-by: Matt Blenkinsop --- circ/waitingreserves.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/circ/waitingreserves.pl b/circ/waitingreserves.pl index 2e56c5e86f..26924f27fd 100755 --- a/circ/waitingreserves.pl +++ b/circ/waitingreserves.pl @@ -116,7 +116,7 @@ while ( my $hold = $holds->next ) { } -my $holds_with_cancellation_requests = Koha::Holds->waiting->filter_by_has_cancellation_requests; +my $holds_with_cancellation_requests = Koha::Holds->waiting->search({ ($all_branches ? () : ( branchcode => $default ) ) })->filter_by_has_cancellation_requests; $template->param(cancel_result => \@cancel_result) if @cancel_result; -- 2.39.5