Bugzilla – Attachment 182789 Details for
Bug 40002
Cannot filter patrons by "Browse by last name"
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 40002: Fix filtering of patrons by 'Browse by last name'
Bug-40002-Fix-filtering-of-patrons-by-Browse-by-la.patch (text/plain), 1.50 KB, created by
Jonathan Druart
on 2025-05-27 08:08:28 UTC
(
hide
)
Description:
Bug 40002: Fix filtering of patrons by 'Browse by last name'
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2025-05-27 08:08:28 UTC
Size:
1.50 KB
patch
obsolete
>From 3e78ed222637cf72deaf79b94a6a1bdc1a05d311 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 27 May 2025 10:07:12 +0200 >Subject: [PATCH] Bug 40002: Fix filtering of patrons by 'Browse by last name' > >We cannot longer filter patrons by first letter, the browser errors >"Uncaught TypeError: v.replace is not a function" >--- > koha-tmpl/intranet-tmpl/prog/js/datatables.js | 10 +++++++--- > 1 file changed, 7 insertions(+), 3 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/datatables.js b/koha-tmpl/intranet-tmpl/prog/js/datatables.js >index 8a691f0616a..dcfef3cf7a4 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/datatables.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/datatables.js >@@ -714,9 +714,13 @@ function _dt_default_ajax(params) { > } else if (f == "-and") { > if (v) and_query_parameters.push(v); > } else if (v) { >- additional_filters[k] = v >- .replace(/^\^/, "") >- .replace(/\$$/, ""); >+ if (typeof v === "string") { >+ additional_filters[k] = v >+ .replace(/^\^/, "") >+ .replace(/\$$/, ""); >+ } else { >+ additional_filters[k] = v; >+ } > } > } > if (Object.keys(additional_filters).length) { >-- >2.34.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 40002
:
182789
|
182790
|
182793
|
182804
|
182805