Bugzilla – Attachment 182744 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.26 KB, created by
Martin Renvoize (ashimema)
on 2025-05-22 16:12:07 UTC
(
hide
)
Description:
Bug 39920: Update query for check previous checkout to use IN
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2025-05-22 16:12:07 UTC
Size:
1.26 KB
patch
obsolete
>From edb493feaae12e27339c677fb6952878d5eca341 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> >Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> >--- > 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.49.0
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