Bugzilla – Attachment 122286 Details for
Bug 3142
Standardize how OPAC and staff determine requestability
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 3142: Add itype
Bug-3142-Add-itype.patch (text/plain), 1.46 KB, created by
Jonathan Druart
on 2021-06-22 13:57:14 UTC
(
hide
)
Description:
Bug 3142: Add itype
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2021-06-22 13:57:14 UTC
Size:
1.46 KB
patch
obsolete
>From 488c41d6797c20e49461f97c895dcf0b46532590 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 22 Jun 2021 15:43:10 +0200 >Subject: [PATCH] Bug 3142: Add itype > >--- > Koha/Items.pm | 13 ++++++++++++- > 1 file changed, 12 insertions(+), 1 deletion(-) > >diff --git a/Koha/Items.pm b/Koha/Items.pm >index fe9de72d05f..d6f442cd20e 100644 >--- a/Koha/Items.pm >+++ b/Koha/Items.pm >@@ -24,6 +24,7 @@ use Carp; > use Koha::Database; > > use Koha::Item; >+use Koha::CirculationRules; > > use base qw(Koha::Objects); > >@@ -48,6 +49,15 @@ Return the items of the set that are holdable > sub filter_by_for_hold { > my ($self) = @_; > >+ my @hold_not_allowed_itypes = Koha::CirculationRules->search( >+ { >+ rule_name => 'holdallowed', >+ branchcode => undef, >+ categorycode => undef, >+ rule_value => 'not_allowed', >+ } >+ )->get_column('itemtype'); >+ > return $self->search( > { > itemlost => 0, >@@ -55,7 +65,8 @@ sub filter_by_for_hold { > notforloan => { '<=' => 0 } > , # items with negative or zero notforloan value are holdable > onloan => undef, >- ( C4::Context->preference('AllowHoldsOnDamagedItems') ? ( damaged => 0 ) : () ) >+ ( C4::Context->preference('AllowHoldsOnDamagedItems') ? ( damaged => 0 ) : () ), >+ itype => { -not_in => \@hold_not_allowed_itypes }, > } > ); > } >-- >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 3142
:
122284
|
122285
|
122286
|
122287
|
122314
|
122315
|
122316
|
122317
|
125727
|
125728
|
125729
|
125730
|
125732
|
125733
|
125734
|
125942
|
125943
|
125944
|
125945
|
125946
|
125947
|
125948
|
125949
|
125950
|
125951
|
125956
|
125967
|
125968
|
125969
|
125970
|
125971
|
125972
|
125973
|
125974
|
125975
|
125976
|
125977