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 <david@davidnind.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
(cherry picked from commit 67f4fcc204)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit cb99c788f7)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
This commit is contained in:
Lucas Gass 2023-10-06 15:15:39 +00:00 committed by Matt Blenkinsop
parent 74439523cf
commit b1628a56a0

View file

@ -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;