Bugzilla – Attachment 181259 Details for
Bug 39473
Drop-down filters on item holdings table should match codes exactly
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 39473: Use exact search for column filtering with dropdown
Bug-39473-Use-exact-search-for-column-filtering-wi.patch (text/plain), 1.74 KB, created by
Jonathan Druart
on 2025-04-22 12:44:12 UTC
(
hide
)
Description:
Bug 39473: Use exact search for column filtering with dropdown
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2025-04-22 12:44:12 UTC
Size:
1.74 KB
patch
obsolete
>From fde428b340d2175eead128bfb3ddf77840cae8ec Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 22 Apr 2025 14:41:24 +0200 >Subject: [PATCH] Bug 39473: Use exact search for column filtering with > dropdown > >We need to use an exact search when using the id of an option. > >Test plan: >0. If not using default KTD data, create an item type with the following settings: > Item type: BK > Description: Books > leave all other values on their defaults > >1. Create a new item type with the following settings: > Item type: BKA > Description: Other type of book > leave all other values on their defaults > >2. Add or edit items on a bib record so that the record has at least one item of type "Books" and at least one item of type "Another type of book" > >3. Go to Normal View for that bib record > >4. Click "Show filters" above the item holdings table > >5. In the Item type column, filter by "Books" >Only "Books" items show in the table >--- > koha-tmpl/intranet-tmpl/prog/js/datatables.js | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/datatables.js b/koha-tmpl/intranet-tmpl/prog/js/datatables.js >index 29cd54d5962..cfa6cb7edea 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/datatables.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/datatables.js >@@ -1052,7 +1052,7 @@ function _dt_add_filters(table_node, table_dt, filters_options = {}) { > } > $(filters_options[i]).each(function () { > let o = $( >- '<option value="%s">%s</option>'.format( >+ '<option value="^%s$">%s</option>'.format( > this._id, > this._str > ) >-- >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 39473
:
181258
|
181259
|
181268
|
181570
|
181571
|
182109
|
182110