Bugzilla – Attachment 109291 Details for
Bug 25877
[19.11] Error libraryNotPickupLocation when placing a hold if logged in branchcode is not a pickup location
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 25877: Error libraryNotPickupLocation when placing a hold if logged in branchcode is not a pickup location
Bug-25877-Error-libraryNotPickupLocation-when-plac.patch (text/plain), 1.80 KB, created by
Katrin Fischer
on 2020-08-29 10:40:50 UTC
(
hide
)
Description:
Bug 25877: Error libraryNotPickupLocation when placing a hold if logged in branchcode is not a pickup location
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2020-08-29 10:40:50 UTC
Size:
1.80 KB
patch
obsolete
>From fa442d0555feb5aece14a02853cfb27878caa35c Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Thu, 25 Jun 2020 07:13:55 -0400 >Subject: [PATCH] Bug 25877: Error libraryNotPickupLocation when placing a hold > if logged in branchcode is not a pickup location > >On the staff side, if the librarian is logged in as a branch that is not a hold pickup location, that branch is still used as the default pickup location for the rules, resulting in the item not holdable reason libraryNotPickupLocation, while the pulldown shows the first branch that can actually be used as a pickup location. > >Test Plan: >1) Log in to Koha >2) Set your logged in branch to not be a pickup location >3) Attempt to place a hold >4) Note the error message >5) Apply this patch >6) Restart plack >7) Reload the page >8) Note the error is gone! > >Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> > >Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org> > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > reserve/request.pl | 6 ++++++ > 1 file changed, 6 insertions(+) > >diff --git a/reserve/request.pl b/reserve/request.pl >index 92f75b2c26..bebd7784ed 100755 >--- a/reserve/request.pl >+++ b/reserve/request.pl >@@ -70,6 +70,12 @@ my ( $template, $borrowernumber, $cookie, $flags ) = get_template_and_user( > my $showallitems = $input->param('showallitems'); > my $pickup = $input->param('pickup') || C4::Context->userenv->{'branch'}; > >+my $pickup_branch = Koha::Libraries->find( $pickup ); >+unless ( $pickup_branch->pickup_location ) { >+ $pickup_branch = Koha::Libraries->search({ pickup_location => 1 })->next; >+ $pickup = $pickup_branch ? $pickup_branch->id : undef; >+} >+ > my $itemtypes = { map { $_->{itemtype} => $_ } @{ Koha::ItemTypes->search_with_localization->unblessed } }; > > # Select borrowers infos >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 25877
:
106287
|
106292
|
106310
| 109291