Koha-clms/t/cypress/integration/KohaTable
Jonathan Druart 9e437a4089
Bug 40876: Apply 'exact' to all attributes when column filtering
If you select an option in a column filter, the "exact" behaviour will
only apply to the first attribute mapped to this column

eg. on the patron search we have "Libraries" mapped to library.name and
library.library_id. If you select Centerville/CPL, the generated q
parameter will be {name: CPL, id: {like: "%CPL%"}}

This is caused by:
    if (value.match(/^\^(.*)\$$/)) {
        value = value.replace(/^\^/, "").replace(/\$$/, "");
On the second parameter we have lost the ^$ markers

Moving it out of the loop fixes the problem (and does not impact the
other behaviours: we search the same value for all the attributes

Test plan:
Create a library with code=CPLL and use if for a patron
Go to http://localhost:8081/cgi-bin/koha/members/members-home.pl
Click search
Select "Centerville" in the "Libraries" column filter
=> Without this patch you get the patrons from CPL and CPLL
=> With this patch applied only patrons from CPL are listed

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-09-25 11:07:42 -06:00
..
CirculationHistory_spec.ts Bug 40301: (bug 40299 follow-up) Add Cypress tests 2025-07-21 14:01:24 -06:00
Holdings_spec.ts Bug 40174: Fix codespell 2025-07-22 09:01:00 +02:00
KohaTable_spec.ts Bug 40051: Remove 'only' from KohaTable_spec.ts 2025-08-01 13:22:44 -06:00
OPACCirculationHistory_spec.ts Bug 40345: Use then to prevent async issues 2025-07-21 14:01:27 -06:00
PatronSearch_spec.ts Bug 40876: Apply 'exact' to all attributes when column filtering 2025-09-25 11:07:42 -06:00
PendingHolds_spec.ts Bug 40180: Fix Cypress test 2025-07-23 09:34:52 +02:00