Bugzilla – Attachment 135209 Details for
Bug 30730
Holds to Pull should not list items with a notforloan status
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 30730: (follow-up) Simplify query
Bug-30730-follow-up-Simplify-query.patch (text/plain), 1.43 KB, created by
Martin Renvoize (ashimema)
on 2022-05-19 15:29:27 UTC
(
hide
)
Description:
Bug 30730: (follow-up) Simplify query
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2022-05-19 15:29:27 UTC
Size:
1.43 KB
patch
obsolete
>From e9fbee5c6dc88fa24ad77ef8c4859a86ea389e4a Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Thu, 19 May 2022 15:52:21 +0100 >Subject: [PATCH] Bug 30730: (follow-up) Simplify query > >This patch drops the 'fetch all non-loanable items' query used in the >subsequent query as part of the 'not_in' and instead replaces it with a >simple filter on 'notforloan => 0' > >Test plan >Run the included unit tests before and apply applying the followup. > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > Koha/Holds.pm | 10 ++-------- > 1 file changed, 2 insertions(+), 8 deletions(-) > >diff --git a/Koha/Holds.pm b/Koha/Holds.pm >index 69899cac8f..8e71ac3cf3 100644 >--- a/Koha/Holds.pm >+++ b/Koha/Holds.pm >@@ -134,19 +134,13 @@ sub get_items_that_can_fill { > collapse => 1, > } > )->get_column('itemnumber'); >- my @notforloan = Koha::Items->search( >- { notforloan => { '!=' => 0 } }, >- { >- columns => ['itemnumber'], >- collapse => 1, >- } >- )->get_column('itemnumber'); > > return Koha::Items->search( > { > -or => \@bibs_or_items, >- itemnumber => { -not_in => [ @branchtransfers, @waiting_holds, @notforloan ] }, >+ itemnumber => { -not_in => [ @branchtransfers, @waiting_holds ] }, > onloan => undef, >+ notforloan => 0, > } > )->filter_by_for_hold(); > } >-- >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 30730
:
135074
|
135075
|
135081
|
135082
|
135207
|
135208
|
135209
|
135210
|
135211
|
135212