Bugzilla – Attachment 70079 Details for
Bug 18474
Placing multiple holds from results breaks when patron is searched for
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18474: Restore multiple holds when patron is searched for
Bug-18474-Restore-multiple-holds-when-patron-is-se.patch (text/plain), 5.21 KB, created by
Jonathan Druart
on 2017-12-21 19:02:21 UTC
(
hide
)
Description:
Bug 18474: Restore multiple holds when patron is searched for
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2017-12-21 19:02:21 UTC
Size:
5.21 KB
patch
obsolete
>From 984ba3cb01fc4a39eae6c496a1c9299f812d4358 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 21 Dec 2017 15:59:24 -0300 >Subject: [PATCH] Bug 18474: Restore multiple holds when patron is searched for > >We lost the ability to place multiple holds when we are searching for >patrons. The multi_holds parameter is lost and not handled correctly in >the template. > >Test plan: >- Make sure you can place multiple holds for a patron you will search for >- Same for simple hold > >TODO the multiple holds view should not be displayed if only 1 record >has been selected from the search result. >--- > .../prog/en/includes/circ-patron-search-results.inc | 13 ++++++++++--- > koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt | 5 +++++ > reserve/request.pl | 8 ++------ > 3 files changed, 17 insertions(+), 9 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-patron-search-results.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-patron-search-results.inc >index 29e72a2df9..b72bb5814d 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-patron-search-results.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-patron-search-results.inc >@@ -25,12 +25,19 @@ > </thead> > <tbody> > [% FOREACH borrower IN borrowers %] >- [% IF ( destination == "circ" ) %] >+ [% IF destination == "circ" %] > <tr class="clickable" data-url="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% borrower.borrowernumber %]"> > <td><a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% borrower.borrowernumber %]">[% borrower.surname %], [% borrower.firstname %]</a></td> >+ [% ELSIF destination == "holds" %] >+ [% IF multi_hold %] >+ [% SET data_url = "/cgi-bin/koha/reserve/request.pl?borrowernumber=" _ borrower.borrowernumber _ "&multi_hold=1&biblionumbers=" _ biblionumbers %] >+ [% ELSE %] >+ [% SET data_url = "/cgi-bin/koha/reserve/request.pl?borrowernumber=" _ borrower.borrowernumber _ "&biblionumber=" _ biblionumber %] >+ [% END %] >+ <tr class="clickable" data-url="[% data_url %]"> >+ <td><a href="[% data_url %]">[% borrower.surname %], [% borrower.firstname %]</a></td> > [% ELSE %] >- <tr class="clickable" data-url="/cgi-bin/koha/reserve/request.pl?borrowernumber=[% borrower.borrowernumber %]&biblionumber=[% biblionumber %]"> >- <td><a href="/cgi-bin/koha/reserve/request.pl?borrowernumber=[% borrower.borrowernumber %]&biblionumber=[% biblionumber %]">[% borrower.surname %], [% borrower.firstname %]</a></td> >+ [%# This does not exist %] > [% END %] > <td>[% borrower.cardnumber %]</td> > <td>[% borrower.dateofbirth | $KohaDates %]</td> >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 8639b40da7..98d79bc8a2 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt >@@ -276,7 +276,12 @@ function checkMultiHold() { > <div class="hint">Enter patron card number or partial name:</div> > <input type="text" size="40" id="patron" class="focus" name="findborrower" /> > <input type="submit" value="Search" /> >+ [% IF multi_hold %] >+ <input type="hidden" name="multi_hold" value="[% multi_hold %]"/> >+ <input type="hidden" name="biblionumbers" value="[% biblionumbers %]"/> >+ [% ELSE %] > <input type="hidden" name="biblionumber" value="[% biblionumber %]" /> >+ [% END %] > </fieldset> > [% ELSE %] > [% INCLUDE 'circ-patron-search-results.inc' destination = "holds" %] >diff --git a/reserve/request.pl b/reserve/request.pl >index 919de1f002..6a2b8fa4ff 100755 >--- a/reserve/request.pl >+++ b/reserve/request.pl >@@ -64,8 +64,6 @@ my ( $template, $borrowernumber, $cookie, $flags ) = get_template_and_user( > } > ); > >-my $multihold = $input->param('multi_hold'); >-$template->param(multi_hold => $multihold); > my $showallitems = $input->param('showallitems'); > > my $itemtypes = { map { $_->{itemtype} => $_ } @{ Koha::ItemTypes->search_with_localization->unblessed } }; >@@ -133,6 +131,8 @@ if ($multihold) { > push @biblionumbers, $input->multi_param('biblionumber'); > } > >+# FIXME multi_hold should not be a variable but depends on the number of elements in @biblionumbers >+$template->param(multi_hold => scalar $input->param('multi_hold')); > > # If we have the borrowernumber because we've performed an action, then we > # don't want to try to place another reserve. >@@ -641,10 +641,6 @@ $template->param( biblionumbers => $biblionumbers ); > $template->param( exceeded_maxreserves => $exceeded_maxreserves ); > $template->param( exceeded_holds_per_record => $exceeded_holds_per_record ); > >-if ($multihold) { >- $template->param( multi_hold => 1 ); >-} >- > if ( C4::Context->preference( 'AllowHoldDateInFuture' ) ) { > $template->param( reserve_in_future => 1 ); > } >-- >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 18474
:
70079
|
72934
|
73279
|
73464
|
73465