Koha-clms/t
Jonathan Druart 66e8f837dd
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>
(cherry picked from commit 9e437a4089)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-09-25 19:32:21 +02:00
..
Acquisition Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Biblio Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Budgets Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Circulation Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
External Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Koha Revert "Bug 36135: Fix t/Koha/Auth/Permissions.t" 2025-09-25 15:55:53 +02:00
Number Bug 39325: Automatic fix 2025-04-28 18:51:22 +02:00
SIP Bug 40675: Add unit tests for SIP line ending normalization 2025-09-25 16:22:51 +02:00
Search Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Serials Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Template Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Test Bug 40404: Remove diag from t/Test/Mock/Logger.t 2025-07-24 10:23:39 +02:00
cypress Bug 40876: Apply 'exact' to all attributes when column filtering 2025-09-25 19:32:21 +02:00
data Bug 40812: Move Theke sample plugin repo to GitHub 2025-09-25 16:22:44 +02:00
db_dependent Bug 36095: Fix Selenium tests 2025-09-25 16:22:55 +02:00
edi_testfiles Bug 38689: Improve test coverage 2025-02-21 16:41:23 +01:00
etc Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
lib Bug 40765: Prevent acquisition tests to fail if order.quantity = 0 2025-09-25 16:22:38 +02:00
mock_templates/intranet-tmpl/prog Bug 40004: Replace 'self checkout' with 'self-checkout' 2025-08-22 09:48:11 +02:00
00-check-atomic-updates.t Bug 38944: Manual changes 2025-03-13 17:25:04 +01:00
00-deprecated.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
00-load.t Bug 38944: Manual changes 2025-03-13 17:25:04 +01:00
00-merge-conflict-markers.t Bug 40858: Search merge conflict on files part of the git index 2025-09-25 16:22:57 +02:00
00-testcritic.t Bug 38944: Revert changes to t/00-testcritic.t 2025-03-13 17:25:06 +01:00
00-valid-xml.t Bug 38944: Manual changes 2025-03-13 17:25:04 +01:00
Auth.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
AuthoritiesMarc_MARC21.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
AuthoritiesMarc_UNIMARC.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Barcodes_EAN13.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Barcodes_annual.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Barcodes_hbyymmincr.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Barcodes_incremental.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Biblio.t Bug 38944: Manual changes 2025-03-13 17:25:04 +01:00
Biblio2.t Bug 38944: Manual changes 2025-03-13 17:25:04 +01:00
Budgets.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Charset.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Circulation_barcodedecode.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
ClassSortRoutine.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
ClassSortRoutine_Dewey.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
ClassSortRoutine_Generic.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
ClassSortRoutine_LCC.t Bug 39325: Automatic fix 2025-04-28 18:51:22 +02:00
ClassSource.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Context.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Contract.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
CookieManager.t Bug 39206: Add an allowlist to Koha::CookieManager 2025-07-10 22:47:10 +02:00
Creators.t Bug 39325: Automatic fix 2025-04-28 18:51:22 +02:00
DateUtils.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
EdiInvoice.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Edifact.t Bug 40386: Remove warnings from EDI when running tests 2025-08-22 09:47:50 +02:00
Ediorder.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Ediordrsp.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Form_MessagingPreferences.t Bug 34776: Add unit tests for sub restore_form_values 2025-07-10 22:47:22 +02:00
HtmlTags.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
ImportBatch.t Bug 18772: Remove warnings from t/ImportBatch.t 2025-07-24 21:04:39 +02:00
Installer_PerlModules.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
ItemCirculationAlertPreference.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Koha_MetadataRecord.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Koha_SearchEngine_Elasticsearch_Browse.t Bug 38944: Manual changes 2025-03-13 17:25:04 +01:00
Koha_Template_Plugin_HtmlId.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Koha_Template_Plugin_Koha.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Koha_Util_FrameworkPlugin.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Koha_Util_MARC.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Koha_XSLT_HTTPS.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Labels.t Bug 40388: Remove warning from t/Labels.t 2025-07-24 10:23:31 +02:00
Labels_split_Regex.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Labels_split_ccn.t Bug 38944: Manual changes 2025-03-13 17:25:04 +01:00
Labels_split_ddcn.t Bug 38944: Manual changes 2025-03-13 17:25:04 +01:00
Labels_split_lccn.t Bug 38944: Manual changes 2025-03-13 17:25:04 +01:00
Languages.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Logger.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Makefile.t Bug 39304: Make sure git commands return something 2025-04-22 08:46:25 +02:00
Members_Messaging.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
OpenLibrarySearch.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Output.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Output_JSONStream.t Bug 39325: Automatic fix 2025-04-28 18:51:22 +02:00
Patroncards.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Patroncards_Batch.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Patroncards_Lib.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Patroncards_Patroncard.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Patroncards_Profile.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Patroncards_Template.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
RecordProcessor.t Bug 40128: Unit tests 2025-07-24 10:23:18 +02:00
Ris.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
SMS.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Scheduler.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Scrubber.t Bug 40079: (follow-up) Improve test coverage and fix undef handling 2025-07-10 22:47:17 +02:00
Search.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Search_PazPar2.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
SimpleMARC.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
SuggestionEngine.t Bug 38944: Manual changes 2025-03-13 17:25:04 +01:00
SuggestionEngine_AuthorityFile.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
TmplToken.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Token.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
template_filters.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
timezones.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00