Bugzilla – Attachment 166905 Details for
Bug 36871
Honor DefaultHoldPickupLocation when placing holds for multiple items at once
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36871: Honor DefaultHoldPickupLocation when placing holds for multiple items at once
Bug-36871-Honor-DefaultHoldPickupLocation-when-pla.patch (text/plain), 4.26 KB, created by
Caroline Cyr La Rose
on 2024-05-17 13:36:09 UTC
(
hide
)
Description:
Bug 36871: Honor DefaultHoldPickupLocation when placing holds for multiple items at once
Filename:
MIME Type:
Creator:
Caroline Cyr La Rose
Created:
2024-05-17 13:36:09 UTC
Size:
4.26 KB
patch
obsolete
>From 973f844e216bf951499220b64b9a610a7136f52a Mon Sep 17 00:00:00 2001 >From: Lucas Gass <lucas@bywatersolutions.com> >Date: Thu, 16 May 2024 22:54:23 +0000 >Subject: [PATCH] Bug 36871: Honor DefaultHoldPickupLocation when placing holds > for multiple items at once > >To test: >0. Make sure the DefaultHoldPickupLocation system preference is set to logged in library. >1. In the staff interface, search the catalog with a term that will return a couple of items (e.g. Shakespeare) >2. In the search results, select two or more results >3. Click Place hold >4. Search for a patron (e.g. Acevedo) > --> "Pickup location" is empty and the staff member must select the library >5. APPLY PATCH and restart_all >6. Try again, the default should be set according to the DefaultHoldPickupLocation system preference > >Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> >--- > .../prog/en/modules/reserve/request.tt | 5 +---- > reserve/request.pl | 16 +++++++++------- > 2 files changed, 10 insertions(+), 11 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt >index 959c4a33cb..de368798d8 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt >@@ -1136,10 +1136,7 @@ > data-biblio-id="[% biblioloo.biblionumber | html %]" > data-patron-id="[% patron.borrowernumber | html %]" > data-pickup-locations='[% biblioloo.pickup_locations_codes.json | $raw %]'> >- <option value=""></option> >- [% FOREACH pickup_location IN biblioloo.pickup_locations %] >- <option value="[% pickup_location.branchcode | html %]">[% pickup_location.branchname | html %]</option> >- [% END %] >+ [% PROCESS options_for_libraries libraries => Branches.pickup_locations({ search_params => { biblio => biblionumber, patron => patron }, selected => biblioloo.default_pickup_branch }) %] > </select> > [% END %] > </td> >diff --git a/reserve/request.pl b/reserve/request.pl >index 5d0887764d..a710e1e2fd 100755 >--- a/reserve/request.pl >+++ b/reserve/request.pl >@@ -565,6 +565,15 @@ if ( ( $findborrower && $borrowernumber_hold || $findclub && $club_hold ) > if ($item->{ccode}) { > $itemdata_ccode = 1; > } >+ if ( $patron && $multi_hold ) { >+ >+ # Add the valid pickup locations >+ my @pickup_locations = $biblio->pickup_locations( { patron => $patron } ) >+ ->search( { branchcode => $default_pickup_branch } )->as_list; >+ $biblioloopiter{default_pickup_branch} = $default_pickup_branch; >+ $biblioloopiter{pickup_locations} = \@pickup_locations; >+ $biblioloopiter{pickup_locations_codes} = [ map { $_->branchcode } @pickup_locations ]; >+ } > } > > push @{ $biblioloopiter{itemloop} }, $item; >@@ -692,13 +701,6 @@ if ( ( $findborrower && $borrowernumber_hold || $findclub && $club_hold ) > $template->param( reserveloop => \@reserveloop ); > } > >- if ( $patron && $multi_hold ) { >- # Add the valid pickup locations >- my @pickup_locations = $biblio->pickup_locations({ patron => $patron })->as_list; >- $biblioloopiter{pickup_locations} = \@pickup_locations; >- $biblioloopiter{pickup_locations_codes} = [ map { $_->branchcode } @pickup_locations ]; >- } >- > $num_bibs_available++ unless $biblioloopiter{none_avail}; > push @biblioloop, \%biblioloopiter; > } >-- >2.34.1
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 36871
:
166857
|
166905
|
171263