Bugzilla – Attachment 124983 Details for
Bug 28667
Check damaged item can be reserved in OPAC detail pages
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28667: (QA follow-up) Fetch preference once
Bug-28667-QA-follow-up-Fetch-preference-once.patch (text/plain), 2.94 KB, created by
Nick Clemens (kidclamp)
on 2021-09-17 12:15:07 UTC
(
hide
)
Description:
Bug 28667: (QA follow-up) Fetch preference once
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2021-09-17 12:15:07 UTC
Size:
2.94 KB
patch
obsolete
>From 7a6945205d46b1910b5d48726b812dd030b7f197 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Fri, 17 Sep 2021 12:05:26 +0000 >Subject: [PATCH] Bug 28667: (QA follow-up) Fetch preference once > >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >--- > opac/opac-ISBDdetail.pl | 3 ++- > opac/opac-MARCdetail.pl | 3 ++- > opac/opac-detail.pl | 3 ++- > 3 files changed, 6 insertions(+), 3 deletions(-) > >diff --git a/opac/opac-ISBDdetail.pl b/opac/opac-ISBDdetail.pl >index fdbd6648ee..8c7d92ba09 100755 >--- a/opac/opac-ISBDdetail.pl >+++ b/opac/opac-ISBDdetail.pl >@@ -176,12 +176,13 @@ my $res = GetISBDView({ > }); > > my $items = $biblio->items; >+my $allow_damaged_holds = C4::Context->preference('AllowHoldsOnDamagedItems'); > while ( my $item = $items->next ) { > $norequests = 0 > if $norequests > && !$item->withdrawn > && !$item->itemlost >- && ( !$item->damaged || C4::Context->preference('AllowHoldsOnDamagedItems') ) >+ && ( !$item->damaged || $allow_damaged_holds ) > && ($item->notforloan < 0 || not $item->notforloan ) > && !Koha::ItemTypes->find($item->effective_itemtype)->notforloan > && $item->itemnumber; >diff --git a/opac/opac-MARCdetail.pl b/opac/opac-MARCdetail.pl >index 2fb3915098..164125f89a 100755 >--- a/opac/opac-MARCdetail.pl >+++ b/opac/opac-MARCdetail.pl >@@ -146,13 +146,14 @@ $template->param( > my $norequests = 1; > my $allow_onshelf_holds; > my $items = $biblio->items; >+my $allow_damaged_holds = C4::Context->preference('AllowHoldsOnDamagedItems'); > > while ( my $item = $items->next ) { > $norequests = 0 > if $norequests > && !$item->withdrawn > && !$item->itemlost >- && ( !$item->damaged || C4::Context->preference('AllowHoldsOnDamagedItems') ) >+ && ( !$item->damaged || $allow_damaged_holds ) > && ($item->notforloan < 0 || not $item->notforloan ) > && !Koha::ItemTypes->find($item->effective_itemtype)->notforloan > && $item->itemnumber; >diff --git a/opac/opac-detail.pl b/opac/opac-detail.pl >index 5a8036e18c..05b58f1278 100755 >--- a/opac/opac-detail.pl >+++ b/opac/opac-detail.pl >@@ -701,6 +701,7 @@ if ( not $viewallitems and @items > $max_items_to_display ) { > items_count => scalar( @items ), > ); > } else { >+ my $allow_damaged_holds = C4::Context->preference('AllowHoldsOnDamagedItems'); > for my $itm (@items) { > my $item = Koha::Items->find( $itm->{itemnumber} ); > $itm->{holds_count} = $item_reserves{ $itm->{itemnumber} }; >@@ -709,7 +710,7 @@ if ( not $viewallitems and @items > $max_items_to_display ) { > if $norequests > && !$itm->{'withdrawn'} > && !$itm->{'itemlost'} >- && ( !$itm->{'damaged'} || C4::Context->preference('AllowHoldsOnDamagedItems') ) >+ && ( !$itm->{'damaged'} || $allow_damaged_holds ) > && ($itm->{'itemnotforloan'}<0 || not $itm->{'itemnotforloan'}) > && !$itemtypes->{$itm->{'itype'}}->{notforloan} > && $itm->{'itemnumber'}; >-- >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 28667
:
122599
|
123773
|
123805
|
124981
|
124982
| 124983