Bug 41341

Summary: Some filters do not use the exact match in detail.pl
Product: Koha Reporter: Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski>
Component: Staff interfaceAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: gmcharlt, jonathan.druart
Version: Main   
Hardware: All   
OS: All   
GIT URL: Initiative type: ---
Sponsorship status: --- Comma delimited list of Sponsors:
Crowdfunding goal: 0 Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Bug Depends on: 39011    
Bug Blocks:    
Attachments: Bug 41341: [WIP] Reestablish exact matching on library/items
Bug 41341: Do not search the description if filter is selected in the header

Description Baptiste Wojtkowski (bwoj) 2025-12-01 15:51:44 UTC
Bug 40876 added an exact match constraint on column filtering.

However, it looks like historically, there were such filters on itemtypes and library (option values are in the form of "^XXX$") but are not applied anymore.

Steps to reproduce:
1 - Create a library with code "M" and an itemtype with code "B".
2 - Go on /cgi-bin/koha/catalogue/detail.pl?biblionumber=233 (a biblio with items from midway (MPL) and books (BK) 
3 - Filter using library and itemtype created in 1 -> you will get some new filters
Comment 1 Baptiste Wojtkowski (bwoj) 2025-12-01 15:59:20 UTC
Created attachment 190057 [details] [review]
Bug 41341: [WIP] Reestablish exact matching on library/items

Test plan
1 - Create a library with code "M" and an itemtype with code "B".
2 - Go on /cgi-bin/koha/catalogue/detail.pl?biblionumber=233 (a biblio with items from midway (MPL) and books (BK)
3 - Filter using library and itemtype created in 1 -> you will get some new filters
4 - Apply patch
5 - Test 3 again -> you should have no result anymore.
6 - Check that filters still work on libraries/items
Comment 2 Jonathan Druart 2025-12-02 10:50:18 UTC
Created attachment 190072 [details] [review]
Bug 41341: Do not search the description if filter is selected in the header

For coded values we have a dropdown list with the list of the possible
options, we should not search on the description

Test plan:
If you have
CPL => Centerville
C   => CCC

No items should be listed on catalogue/detail.pl?biblionumber=4 if you select Current library => 'CCC'