From 991644fa9ddd4f34b3b23b63846f16869f56e9c8 Mon Sep 17 00:00:00 2001 From: Alex Buckley Date: Wed, 29 Aug 2018 23:07:24 +1200 Subject: [PATCH] Bug 15565: Changed the retrieval of selected hold pickup branch in opac-reserve.pl Previously the selected branch dropdown value was not being successfully retrieved in opac-reserve.pl, this resulted in opac holds being placed with no pickup branch being set. Consequently as no branch was associated with the hold an Ajax error was thrown when viewing the holds-table in the patron page in the staff client. This commit successfully retrieves the selected branch value and so fixing the Ajax error. Test plan: 1. Apply all patches on bug report 15565 except this commit 2. Place a hold(s) from opac-reserve.pl. 3. Go to your opac patron summary page (opac-user.pl) and notice although the holds are successfully displayed they have no 'Pickup location' value 4. Go to the patron page in the staff client and click on the 'Hold(s)' tab and notice a popup explaining the datatable Ajax error is loaded 5. Apply this patch 6. Repeat step 3 noticing this time in the opac-user.pl a 'Pickup location' is displayed for the hold you just created. 6. Repeat step 4 and notice the hold datatable is successfully loaded and populated without an Ajax error popup being loaded. Sponsored-By: Brimbank Library --- opac/opac-reserve.pl | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/opac/opac-reserve.pl b/opac/opac-reserve.pl index e53c81a41a..bdaf3272de 100755 --- a/opac/opac-reserve.pl +++ b/opac/opac-reserve.pl @@ -195,9 +195,8 @@ if ( $query->param('place_reserve') ) { foreach my $biblioNum (@biblionumbers) { my $itemNum = $query->param("checkitem_$biblioNum"); my @itemnumbers = $query->param("checkitem_$biblioNum"); - my $branch = $query->param("branch_$biblioNum"); + my $branch = $query->param("branch"); my $reqtype = $query->param("reqtype_$biblioNum"); - warn $biblioNum; if (!$reqtype) { #If no $reqtype value has been passed from the form this means both reqany and reqspecific radio buttons are disabled because a hold has been placed on this biblio previously and so a forced_hold_level exists. # Determine what the forced_hold_level is. -- 2.11.0