From 95fa2ae3f8a0a9c1451c3830c0d4bc94d8494a45 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 Signed-off-by: Katrin Fischer --- 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 03197e6..05c77d2 100755 --- a/opac/opac-reserve.pl +++ b/opac/opac-reserve.pl @@ -190,9 +190,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.1.4