Bug 38632

Summary: holdings table - all columns shown when displaying the filters
Product: Koha Reporter: Jonathan Druart <jonathan.druart>
Component: Staff interfaceAssignee: Jonathan Druart <jonathan.druart>
Status: Signed Off --- QA Contact: Testopia <testopia>
Severity: major    
Priority: P5 - low CC: blawlor, gmcharlt, martin.renvoize
Version: unspecifiedKeywords: rel_24_11_candidate
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38724
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Bug Depends on: 38485    
Bug Blocks:    
Attachments: Bug 38632: Do not show all columns when displaying the filters
Bug 38632: Add tests
Bug 38632: Do not show all columns when displaying the filters
Bug 38632: Add tests

Description Jonathan Druart 2024-12-05 13:06:03 UTC
If we click on "Show filters" all the columns are shown.
Comment 1 Jonathan Druart 2024-12-09 11:26:42 UTC
Created attachment 175296 [details] [review]
Bug 38632: Do not show all columns when displaying the filters

Yet another visibility bug fix for this specific table.
When the filters are displayed the table is destroyed and recreated.
We should not save the visibility changes made by DT and consider them
changes made by the user.
A temporary variable is used to store the user settings duringt this
action, then we restore them once it's done.

Test plan:
Go to the detail page of bibliographic record with items
Click on "show filters"
=> Only columns displayed should still be displayed
Retry but show/hide some columns before you display the filters
=> Only columns displayed should still be displayed
Comment 2 Jonathan Druart 2024-12-09 11:26:44 UTC
Created attachment 175297 [details] [review]
Bug 38632: Add tests

You need bug 38461 to run successfully this test.
Comment 3 Jonathan Druart 2024-12-09 11:27:17 UTC Comment hidden (obsolete)
Comment 4 Jonathan Druart 2024-12-09 11:27:59 UTC
Not adding the dependency on bug 38461 because the first patch should be backported (with or without the tests).
Comment 5 Brendan Lawlor 2024-12-11 20:01:12 UTC
Created attachment 175380 [details] [review]
Bug 38632: Do not show all columns when displaying the filters

Yet another visibility bug fix for this specific table.
When the filters are displayed the table is destroyed and recreated.
We should not save the visibility changes made by DT and consider them
changes made by the user.
A temporary variable is used to store the user settings duringt this
action, then we restore them once it's done.

Test plan:
Go to the detail page of bibliographic record with items
Click on "show filters"
=> Only columns displayed should still be displayed
Retry but show/hide some columns before you display the filters
=> Only columns displayed should still be displayed

Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Comment 6 Brendan Lawlor 2024-12-11 20:01:14 UTC
Created attachment 175381 [details] [review]
Bug 38632: Add tests

You need bug 38461 to run successfully this test.

Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Comment 7 Brendan Lawlor 2024-12-11 20:13:34 UTC
This works as described.

During testing I noticed small related bug in current main. On the bibliographic record details page if you click to configure columns and you add or remove a column it automatically shows the column filters too, but it does not toggle the filter link to 'Hide filters` so you have to click twice to hide them.

In 24.05 configuring the columns does not automatically show the column filters so I think it's a regression in 24.11

I tried to run the cypress tests but couldn't get it to work:
kohadev-koha@kohadevbox:koha(main)$ cypress run --spec t/cypress/integration/KohaTable_spec.ts 
[18586:1211/194337.239929:ERROR:gpu_memory_buffer_support_x11.cc(44)] dri3 extension not supported.

DevTools listening on ws://127.0.0.1:46069/devtools/browser/82072b5e-0295-4314-b0dd-1937534ca2f2
Missing baseUrl in compilerOptions. tsconfig-paths will be skipped
Your configFile threw an error from: /kohadevbox/koha/cypress.config.ts
Comment 8 Martin Renvoize (ashimema) 2024-12-17 07:08:43 UTC
sha1 issues on attempting to apply I'm afraid
Comment 9 Jonathan Druart 2024-12-17 09:02:31 UTC
(In reply to Martin Renvoize (ashimema) from comment #8)
> sha1 issues on attempting to apply I'm afraid

"You need bug 38461 to run successfully this test."

I have not added the dependency to not confuse RMaint as the first patch needs to be backported.
Comment 10 Jonathan Druart 2024-12-17 09:12:15 UTC
(In reply to Brendan Lawlor from comment #7)
> During testing I noticed small related bug in current main. On the
> bibliographic record details page if you click to configure columns and you
> add or remove a column it automatically shows the column filters too, but it
> does not toggle the filter link to 'Hide filters` so you have to click twice
> to hide them.

See bug 38724.