Bugzilla – Attachment 69817 Details for
Bug 4319
waiting and in transit items cannot be reserved
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 4319: (QA follow-up) Use ReservableItems in all scripts
Bug-4319-QA-follow-up-Use-ReservableItems-in-all-s.patch (text/plain), 2.94 KB, created by
Marcel de Rooy
on 2017-12-15 10:26:14 UTC
(
hide
)
Description:
Bug 4319: (QA follow-up) Use ReservableItems in all scripts
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2017-12-15 10:26:14 UTC
Size:
2.94 KB
patch
obsolete
>From 816a53d99b9a3c5ac387d98050ad5cc32d09adfc Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Fri, 15 Dec 2017 10:49:44 +0100 >Subject: [PATCH] Bug 4319: (QA follow-up) Use ReservableItems in all scripts >Content-Type: text/plain; charset=utf-8 > >[1] Call CountItemsIssued or hasItemswaitingOrInTransit when needed only. >[2] Add this logic to ISBD and MARC detail too, since they also use > this include. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Confirming that Place hold now comes up if you have a waiting item and >circulation rule == If any unavailable. >--- > opac/opac-ISBDdetail.pl | 7 ++++--- > opac/opac-MARCdetail.pl | 5 +++-- > opac/opac-detail.pl | 6 +++--- > 3 files changed, 10 insertions(+), 8 deletions(-) > >diff --git a/opac/opac-ISBDdetail.pl b/opac/opac-ISBDdetail.pl >index 7af7410..d9447cc 100755 >--- a/opac/opac-ISBDdetail.pl >+++ b/opac/opac-ISBDdetail.pl >@@ -79,8 +79,6 @@ if(my $cart_list = $query->cookie("bib_list")){ > } > } > >-$template->param( 'ItemsIssued' => CountItemsIssued( $biblionumber ) ); >- > my $marcflavour = C4::Context->preference("marcflavour"); > > my @items = GetItemsInfo($biblionumber); >@@ -183,9 +181,12 @@ for my $itm (@items) { > unless $allow_onshelf_holds; > } > >+if( $allow_onshelf_holds || CountItemsIssued($biblionumber) || $biblio->hasItemswaitingOrInTransit ) { >+ $template->param( ReservableItems => 1 ); >+} >+ > $template->param( > RequestOnOpac => C4::Context->preference("RequestOnOpac"), >- AllowOnShelfHolds => $allow_onshelf_holds, > norequests => $norequests, > ISBD => $res, > biblio => $biblio, >diff --git a/opac/opac-MARCdetail.pl b/opac/opac-MARCdetail.pl >index 334e383..90b2974 100755 >--- a/opac/opac-MARCdetail.pl >+++ b/opac/opac-MARCdetail.pl >@@ -136,8 +136,9 @@ for my $itm (@all_items) { > last if $allow_onshelf_holds; > } > >-$template->param( 'AllowOnShelfHolds' => $allow_onshelf_holds ); >-$template->param( 'ItemsIssued' => CountItemsIssued( $biblionumber ) ); >+if( $allow_onshelf_holds || CountItemsIssued($biblionumber) || $biblio->hasItemswaitingOrInTransit ) { >+ $template->param( ReservableItems => 1 ); >+} > > # adding the $RequestOnOpac param > my $RequestOnOpac; >diff --git a/opac/opac-detail.pl b/opac/opac-detail.pl >index c069924..b217a03 100755 >--- a/opac/opac-detail.pl >+++ b/opac/opac-detail.pl >@@ -719,9 +719,9 @@ if ( not $viewallitems and @items > $max_items_to_display ) { > } > } > >-my $itemsWaitingOrInTransit = Koha::Biblios->find($biblionumber)->hasItemswaitingOrInTransit || 0; >-my $itemsIssued = CountItemsIssued( $biblionumber ); >-$template->param( 'ReservableItems' => $itemsWaitingOrInTransit || $itemsIssued || $allow_onshelf_holds ); >+if( $allow_onshelf_holds || CountItemsIssued($biblionumber) || $biblio->hasItemswaitingOrInTransit ) { >+ $template->param( ReservableItems => 1 ); >+} > > # Display only one tab if one items list is empty > if (scalar(@itemloop) == 0 || scalar(@otheritemloop) == 0) { >-- >2.1.4
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 4319
:
3740
|
4099
|
4110
|
4327
|
4329
|
16965
|
67558
|
67584
|
67637
|
67704
|
67970
|
68194
|
68197
|
68198
|
68199
|
68531
|
68782
|
68786
|
69724
|
69725
|
69728
|
69815
|
69816
| 69817 |
70457