Bug 40121

Summary: library and category not selected on the patron search
Product: Koha Reporter: Jonathan Druart <jonathan.druart>
Component: Staff interfaceAssignee: Jonathan Druart <jonathan.druart>
Status: Signed Off --- QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: david, flaterdavid, gmcharlt
Version: unspecified   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40118
GIT URL: Change sponsored?: ---
Patch complexity: --- Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: Bug 40121: Add Cypress tests
Bug 40121: Fix library and category filters on patron search
Bug 40121: Add Cypress tests
Bug 40121: Fix library and category filters on patron search
Bug 40121: Add Cypress tests

Description Jonathan Druart 2025-06-11 14:40:54 UTC
When library and/or patron is picked in the left filters, the column filters of the table should have them selected.
Comment 1 Jonathan Druart 2025-06-11 14:42:58 UTC
Created attachment 183167 [details] [review]
Bug 40121: Add Cypress tests
Comment 2 Jonathan Druart 2025-06-11 14:43:00 UTC
Created attachment 183168 [details] [review]
Bug 40121: Fix library and category filters on patron search

Test plan:
Go to http://localhost:8081/cgi-bin/koha/members/members-home.pl
Select a value for Library and/or Category filters
Click "Search"
=> Without this patch the dropdown lists do not have the value selected
=> With this patch applied they have the correct values selected
Comment 3 David Flater 2025-06-12 15:15:09 UTC
I unfortunately can't signoff on this, for two main reasons:

One--the changes fail QA

FAIL   t/cypress/integration/KohaTable/PatronSearch_spec.ts
   FAIL   forbidden patterns
                forbidden pattern: .only detected (line 130)

Two--the provided Cypress tests do not pass 

1) Filters
       Keep filters in the column filters:

      Timed out retrying after 10000ms
      + expected - actual

      -'^CPL$'

      at Context.eval (webpack://koha/./t/cypress/integration/KohaTable/PatronSearch_spec.ts:178:14)
Comment 4 Jonathan Druart 2025-06-12 20:10:09 UTC
Created attachment 183217 [details] [review]
Bug 40121: Add Cypress tests
Comment 5 Jonathan Druart 2025-06-12 20:11:35 UTC
(In reply to David Flater from comment #3)
> I unfortunately can't signoff on this, for two main reasons:

Sorry about that, I should have run the QA script.
It also seems that I have added a couple of trivial tests that I haven't retried before submitting the patches!
Comment 6 David Nind 2025-06-13 07:20:31 UTC
Created attachment 183224 [details] [review]
Bug 40121: Fix library and category filters on patron search

Test plan:
Go to http://localhost:8081/cgi-bin/koha/members/members-home.pl
Select a value for Library and/or Category filters
Click "Search"
=> Without this patch the dropdown lists do not have the value selected
=> With this patch applied they have the correct values selected

Signed-off-by: David Nind <david@davidnind.com>
Comment 7 David Nind 2025-06-13 07:20:41 UTC
Created attachment 183225 [details] [review]
Bug 40121: Add Cypress tests

Signed-off-by: David Nind <david@davidnind.com>