Bugzilla – Attachment 125221 Details for
Bug 28919
When placing a multi-hold from results in staff pickup location is empty
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28919: Select logged in library as pickup for multi holds
Bug-28919-Select-logged-in-library-as-pickup-for-m.patch (text/plain), 3.85 KB, created by
Owen Leonard
on 2021-09-23 19:39:50 UTC
(
hide
)
Description:
Bug 28919: Select logged in library as pickup for multi holds
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2021-09-23 19:39:50 UTC
Size:
3.85 KB
patch
obsolete
>From 5e7fa6398d5cc6d39fc74697d30cc35e6016adfd Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 2 Sep 2021 09:48:44 +0200 >Subject: [PATCH] Bug 28919: Select logged in library as pickup for multi holds > >When placing multiple holds from the result list, the pick-up location >is empty now, which makes it a more tedious process than it needs to be. > >Logged in library must be selected to match the single hold logic. > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> >--- > koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers.inc | 2 +- > .../intranet-tmpl/prog/en/modules/reserve/request.tt | 8 +++----- > reserve/request.pl | 6 +++--- > 3 files changed, 7 insertions(+), 9 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers.inc >index 86eab2547f..b257619adc 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers.inc >@@ -1,6 +1,6 @@ > [% BLOCK options_for_libraries %] > [% FOREACH l IN libraries %] >- [% IF l.selected %] >+ [% IF l.branchcode == selected OR l.selected %] > <option value="[% prefix | html %][% l.branchcode | html %]" selected="selected">[% l.branchname | html %]</option> > [% ELSE %] > <option value="[% prefix | html %][% l.branchcode | html %]">[% l.branchname | html %]</option> >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 f54ac0d32a..5c79857f0d 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt >@@ -465,14 +465,12 @@ > [% UNLESS ( multi_hold ) %] > <select name="pickup" id="pickup" data-biblio-id="[% biblio.biblionumber | html %]" data-patron-id="[% patron.borrowernumber | html %]"> > [% PROCESS options_for_libraries libraries => Branches.pickup_locations({ search_params => { biblio => biblionumber, patron => patron }, selected => pickup }) %] >+ </select> > [% ELSE %] > <select name="pickup" id="pickup_multi" data-patron-id="[% patron.borrowernumber | html %]"> >- <option value="" selected="selected"></option> >- [% FOREACH pickup_location IN multi_pickup_locations %] >- <option value="[% pickup_location.branchcode | html %]">[% pickup_location.branchname | html %]</option> >- [% END %] >- [% END %] >+ [% PROCESS options_for_libraries libraries => multi_pickup_locations, selected => Branches.GetLoggedInBranchcode %] > </select> >+ [% END %] > </li> > > [% UNLESS ( multi_hold ) %] >diff --git a/reserve/request.pl b/reserve/request.pl >index 6ab8ba7ac5..69857fef09 100755 >--- a/reserve/request.pl >+++ b/reserve/request.pl >@@ -285,10 +285,10 @@ $template->param( > my $patron = Koha::Patrons->find( $borrowernumber_hold ); > > if ( $patron && $multi_hold ) { >- my @multi_pickup_locations = >+ my $multi_pickup_locations = > Koha::Biblios->search( { biblionumber => \@biblionumbers } ) >- ->pickup_locations( { patron => $patron } ); >- $template->param( multi_pickup_locations => \@multi_pickup_locations ); >+ ->pickup_locations( { patron => $patron } )->unblessed; >+ $template->param( multi_pickup_locations => $multi_pickup_locations ); > } > > my $logged_in_patron = Koha::Patrons->find( $borrowernumber ); >-- >2.20.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 28919
:
124419
|
125221
|
125658
|
128144