Bugzilla – Attachment 116941 Details for
Bug 27718
Holds to Pull list doesn't respect holdallowed circulation rule anymore
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 27718: (bug 24488 follow-up) Hide items not holdable
Bug-27718-bug-24488-follow-up-Hide-items-not-holda.patch (text/plain), 1.96 KB, created by
Jonathan Druart
on 2021-02-17 15:13:59 UTC
(
hide
)
Description:
Bug 27718: (bug 24488 follow-up) Hide items not holdable
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2021-02-17 15:13:59 UTC
Size:
1.96 KB
patch
obsolete
>From 2d5bd4f271bcfebae92f8852f665d8c919a420e9 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 17 Feb 2021 16:11:52 +0100 >Subject: [PATCH] Bug 27718: (bug 24488 follow-up) Hide items not holdable > >After bug 24488 was merged Holds to Pull list (/cgi-bin/koha/circ/pendingreserves.pl) >doesn't respect anymore the 'holdallowed' circulation rules (we bisected it to this change). >If we look at the patch "Bug 24488: Show correct first patron details on Holds to pull" >(2285c2d6575) then we can notice that previously the items that were shown in the list >must had holdallowed != 0: > >Now it seems like similar circ rule check is missing in the newly rewritten Holds To Pull implementation. >(description copied from comment 0) > >Test plan: >Have several pending holds >Mark some item type as not holdable in the circulation rules >Confirm that the non holdable items are no longer listed on the "Holds >to pull" view >--- > Koha/Holds.pm | 13 ++++++++++++- > 1 file changed, 12 insertions(+), 1 deletion(-) > >diff --git a/Koha/Holds.pm b/Koha/Holds.pm >index 4a25babff5..c8b3f54a2e 100644 >--- a/Koha/Holds.pm >+++ b/Koha/Holds.pm >@@ -114,7 +114,16 @@ sub get_items_that_can_fill { > } > ); > >- return Koha::Items->search( >+ my @hold_not_allowed_itypes = Koha::CirculationRules->search( >+ { >+ rule_name => 'holdallowed', >+ branchcode => undef, >+ categorycode => undef, >+ rule_value => 0, >+ } >+ )->get_column('itemtype'); >+ >+ my $items = Koha::Items->search( > { > biblionumber => { in => \@biblionumbers }, > itemlost => 0, >@@ -122,8 +131,10 @@ sub get_items_that_can_fill { > notforloan => 0, > onloan => undef, > itemnumber => { -not_in => [ @branchtransfers, @waiting_holds ] }, >+ itype => { -not_in => \@hold_not_allowed_itypes }, > } > ); >+ > } > > =head3 type >-- >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 27718
:
116940
|
116941
|
117198
|
117199
|
117234
|
117235
|
117241
|
117242
|
117243
|
117291
|
117292
|
117293