From 2691a62618c896166ac93051205b945ef91770ce Mon Sep 17 00:00:00 2001 From: Jonathan Druart 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 Signed-off-by: David Nind --- 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 29cd54d596..cfa6cb7ede 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 = $( - ''.format( + ''.format( this._id, this._str ) -- 2.39.5