Bugzilla – Attachment 125978 Details for
Bug 29134
Patron search has poor performance when ExtendedAttributes enabled and many attributes match
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 29134: (follow-up) Specify which borrowernumber
Bug-29134-follow-up-Specify-which-borrowernumber.patch (text/plain), 1.63 KB, created by
Nick Clemens (kidclamp)
on 2021-10-08 14:46:10 UTC
(
hide
)
Description:
Bug 29134: (follow-up) Specify which borrowernumber
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2021-10-08 14:46:10 UTC
Size:
1.63 KB
patch
obsolete
>From d2c53276d05808925cd6f092ba277426548a89c4 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Fri, 8 Oct 2021 14:42:48 +0000 >Subject: [PATCH] Bug 29134: (follow-up) Specify which borrowernumber > >When performing a search that includes permissions we need to specify we are comparing >the borrowers tabnle borrowernumber > >To test: >1 - Browse to Admin->Funds >2 - Edit a fund >3 - Click '+ Add users' >4 - Attempt a search, no results >5 - Check plack-error.log > C4::Utils::DataTables::Members::search(): DBI Exception: DBD::mysql::st execute failed: Column 'borrowernumber' in IN/ALL/ANY subquery is ambiguous at /kohadevbox/koha/svc/members/search line 80 >6 - Apply patch >7 - Repeat 1-3 >8 - search for 'a' >9 - Result! >--- > C4/Utils/DataTables/Members.pm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/C4/Utils/DataTables/Members.pm b/C4/Utils/DataTables/Members.pm >index 97a372bd96..15f04eb972 100644 >--- a/C4/Utils/DataTables/Members.pm >+++ b/C4/Utils/DataTables/Members.pm >@@ -160,7 +160,7 @@ sub search { > > > if ( $searchfieldstype eq 'standard' and C4::Context->preference('ExtendedPatronAttributes') and $searchmember ) { >- push @where_strs_or, " borrowernumber IN ( SELECT DISTINCT borrowernumber FROM borrower_attributes JOIN borrower_attribute_types USING (code) WHERE staff_searchable = 1 AND attribute LIKE ? ) "; >+ push @where_strs_or, " borrowers.borrowernumber IN ( SELECT DISTINCT borrowernumber FROM borrower_attributes JOIN borrower_attribute_types USING (code) WHERE staff_searchable = 1 AND attribute LIKE ? ) "; > push @where_args, $term; > } > >-- >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 29134
:
125451
|
125453
|
125568
|
125649
| 125978