Bugzilla – Attachment 125951 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: Handle biblio level item type
Bug-3142-Handle-biblio-level-item-type.patch (text/plain), 1.82 KB, created by
Jonathan Druart
on 2021-10-08 10:03:58 UTC
(
hide
)
Description:
Bug 3142: Handle biblio level item type
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2021-10-08 10:03:58 UTC
Size:
1.82 KB
patch
obsolete
>From 13fa1397cd3fa1c56bcce8fc16c78c5a10d27190 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Fri, 8 Oct 2021 12:03:41 +0200 >Subject: [PATCH] Bug 3142: Handle biblio level item type > >--- > Koha/Items.pm | 34 +++++++++++++++++++++++++--------- > 1 file changed, 25 insertions(+), 9 deletions(-) > >diff --git a/Koha/Items.pm b/Koha/Items.pm >index ece4b866591..fd93030ffe4 100644 >--- a/Koha/Items.pm >+++ b/Koha/Items.pm >@@ -63,15 +63,31 @@ sub filter_by_for_hold { > )->get_column('itemtype'); > push @hold_not_allowed_itypes, Koha::ItemTypes->search({ notforloan => 1 })->get_column('itemtype'); > >- return $self->search( >- { >- itemlost => 0, >- withdrawn => 0, >- notforloan => { '<=' => 0 }, # items with negative or zero notforloan value are holdable >- ( C4::Context->preference('AllowHoldsOnDamagedItems' ) ? () : ( damaged => 0 ) ), >- itype => { -not_in => \@hold_not_allowed_itypes }, >- } >- ); >+ my $params = { >+ itemlost => 0, >+ withdrawn => 0, >+ notforloan => { '<=' => 0 }, # items with negative or zero notforloan value are holdable >+ ( C4::Context->preference('AllowHoldsOnDamagedItems')? (): ( damaged => 0 ) ), >+ }; >+ >+ if ( C4::Context->preference("item-level_itypes") ) { >+ return $self->search( >+ { >+ %$params, >+ itype => { -not_in => \@hold_not_allowed_itypes }, >+ } >+ ); >+ } else { >+ return $self->search( >+ { >+ %$params, >+ 'biblioitem.itemtype' => { -not_in => \@hold_not_allowed_itypes }, >+ }, >+ { >+ join => 'biblioitem', >+ } >+ ); >+ } > } > > =head3 filter_by_visible_in_opac >-- >2.25.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