Permalink
Browse files

[#23632905] Multiple holds unnecessarily barred

Patrons reserving items through the OPAC were having
all of their reserve requests blocked if just one of
them was already reserved by the patron. This fix
allows patrons to continue with the process for the
remaining requests.
  • Loading branch information...
1 parent dd6ad5a commit 0cc71a0a708437c6e46f05f97c22121b84b3fc5f @ctfliblime ctfliblime committed Jan 24, 2012
Showing with 4 additions and 9 deletions.
  1. +4 −9 cgi/opac/opac-reserve.pl
View
@@ -285,15 +285,7 @@ ($$$)
my $userenv = C4::Context->userenv;
my @reserves = GetReservesFromBorrowernumber( $borrowernumber );
$template->param( RESERVES => \@reserves );
-foreach my $biblionumber (@biblionumbers) {
- # Determine if patron already has a hold on this bib record
- my ($count,$bib_reserve) = GetReservesFromBiblionumber($biblionumber);
- foreach my $res (@$bib_reserve) {
- if ($res->{borrowernumber} eq $borrowernumber) {
- $template->param( message => 1, hold_already_exists => 1 );
- }
- }
-}
+
if ( C4::Context->preference('UseGranularMaxHolds') ) {
$noreserves = 1;
foreach my $biblionumber (@biblionumbers) {
@@ -677,6 +669,9 @@ ($$$)
);
}
+$template->param(message=>1, hold_already_exists=>1, none_available=>0)
+ unless (grep {!defined $_->{already_reserved}} values %biblioDataHash);
+
output_html_with_http_headers $query, $cookie, $template->output;
exit;

0 comments on commit 0cc71a0

Please sign in to comment.