Bugzilla – Attachment 182528 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.16 KB, created by
Nick Clemens (kidclamp)
on 2025-05-16 12:53:29 UTC
(
hide
)
Description:
Bug 39920: Update query for check previous checkout to use IN
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2025-05-16 12:53:29 UTC
Size:
1.16 KB
patch
obsolete
>From d56c258286caa0344e48a69780599b1aca193e60 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 simply alters the query fro checkign previous checkouts to use >IN instead of a list of OR for itemnumbers > >To test: >1 - On the command line: > export DBICE_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 >--- > Koha/Patron.pm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/Koha/Patron.pm b/Koha/Patron.pm >index d9f08197d4b..f849510a662 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