Bugzilla – Attachment 182563 Details for
Bug 39920
do_check_for_previous_checkout should us 'IN' over 'OR'
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 39920: Update query for check previous checkout to use IN
Bug-39920-Update-query-for-check-previous-checkout.patch (text/plain), 1.20 KB, created by
David Nind
on 2025-05-17 19:13:57 UTC
(
hide
)
Description:
Bug 39920: Update query for check previous checkout to use IN
Filename:
MIME Type:
Creator:
David Nind
Created:
2025-05-17 19:13:57 UTC
Size:
1.20 KB
patch
obsolete
>From a94e62dfa0fd40b2b635fc1d0781def606da3565 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Fri, 16 May 2025 12:51:21 +0000 >Subject: [PATCH] Bug 39920: Update query for check previous checkout to use IN > >This patch alters the query for checking previous checkouts to use >IN instead of a list of OR for itemnumbers. > >To test: >1 - On the command line: > export DBIC_TRACE=1 >2 - perl -e 'use Koha::Patrons;my $patron = Koha::Patrons->find(5);my $item = Koha::Items->find(54);warn $item->itemnumber;$patron->do_check_for_previous_checkout( $item->unblessed );' >3 - Note the query >4 - Apply patch >5 - Repeat 2 >6 - Note the shorter query > >Signed-off-by: David Nind <david@davidnind.com> >--- > Koha/Patron.pm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/Koha/Patron.pm b/Koha/Patron.pm >index a091e2c3fb..a1a5a176ca 100644 >--- a/Koha/Patron.pm >+++ b/Koha/Patron.pm >@@ -876,7 +876,7 @@ sub do_check_for_previous_checkout { > # Create (old)issues search criteria > my $criteria = { > borrowernumber => $self->borrowernumber, >- itemnumber => \@item_nos, >+ itemnumber => { -in => \@item_nos }, > }; > > # Check current issues table >-- >2.39.5
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 39920
:
182528
|
182563
|
182744