Bug 40121 - library and category not selected on the patron search
Summary: library and category not selected on the patron search
Status: Pushed to main
Alias: None
Product: Koha
Classification: Unclassified
Component: Staff interface (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low normal
Assignee: Jonathan Druart
QA Contact: Laura Escamilla
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-06-11 14:40 UTC by Jonathan Druart
Modified: 2025-08-01 19:25 UTC (History)
4 users (show)

See Also:
GIT URL:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
25.11.00
Circulation function:


Attachments
Bug 40121: Add Cypress tests (3.27 KB, patch)
2025-06-11 14:42 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 40121: Fix library and category filters on patron search (2.10 KB, patch)
2025-06-11 14:43 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 40121: Add Cypress tests (3.34 KB, patch)
2025-06-12 20:10 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 40121: Fix library and category filters on patron search (2.15 KB, patch)
2025-06-13 07:20 UTC, David Nind
Details | Diff | Splinter Review
Bug 40121: Add Cypress tests (3.39 KB, patch)
2025-06-13 07:20 UTC, David Nind
Details | Diff | Splinter Review
Bug 40121: Fix library and category filters on patron search (2.22 KB, patch)
2025-07-25 18:19 UTC, Laura Escamilla
Details | Diff | Splinter Review
Bug 40121: Add Cypress tests (3.46 KB, patch)
2025-07-25 18:19 UTC, Laura Escamilla
Details | Diff | Splinter Review
Bug 40121: Fix 'Cannot read properties of undefined' (1.14 KB, patch)
2025-07-28 08:09 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 40121: Fix library and category filters on patron search (2.27 KB, patch)
2025-08-01 12:42 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 40121: Add Cypress tests (3.51 KB, patch)
2025-08-01 12:42 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 40121: Fix 'Cannot read properties of undefined' (1.20 KB, patch)
2025-08-01 12:42 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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>
Comment 8 Laura Escamilla 2025-07-25 18:19:12 UTC
Created attachment 184664 [details] [review]
Bug 40121: Fix library and category filters on patron search

QA tools are happy -- everything looks good and works as described. Passing QA here. 

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>
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Comment 9 Laura Escamilla 2025-07-25 18:19:15 UTC
Created attachment 184665 [details] [review]
Bug 40121: Add Cypress tests

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Comment 10 Laura Escamilla 2025-07-25 20:04:09 UTC
Sorry forgot to test cypress tests and they are failing
Comment 11 Jonathan Druart 2025-07-28 08:09:04 UTC
Created attachment 184707 [details] [review]
Bug 40121: Fix 'Cannot read properties of undefined'

Same fix as
  commit 7bc3b24827799bee61a6672db78e12a70ee78ccf
    Bug 40344: Fix KohaTable_spec.ts
    > Cannot read properties of undefined (reading 'description')
Comment 12 Jonathan Druart 2025-07-28 08:09:32 UTC
Yes indeed, it started to fail after I submitted the patch.

Thanks!
Comment 13 Nick Clemens (kidclamp) 2025-08-01 12:42:12 UTC
Created attachment 185001 [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>
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 14 Nick Clemens (kidclamp) 2025-08-01 12:42:14 UTC
Created attachment 185002 [details] [review]
Bug 40121: Add Cypress tests

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 15 Nick Clemens (kidclamp) 2025-08-01 12:42:17 UTC
Created attachment 185003 [details] [review]
Bug 40121: Fix 'Cannot read properties of undefined'

Same fix as
  commit 7bc3b24827799bee61a6672db78e12a70ee78ccf
    Bug 40344: Fix KohaTable_spec.ts
    > Cannot read properties of undefined (reading 'description')

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 16 Lucas Gass (lukeg) 2025-08-01 19:25:03 UTC
Nice work everyone!

Pushed to main for 25.11