Bug 37395 - Cannot hide columns in ERM tables
Summary: Cannot hide columns in ERM tables
Status: Pushed to oldstable
Alias: None
Product: Koha
Classification: Unclassified
Component: ERM (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Jonathan Druart
QA Contact: Pedro Amorim
URL:
Keywords:
Depends on: 33066
Blocks: 33484
  Show dependency treegraph
 
Reported: 2024-07-17 16:05 UTC by Eric Garcia
Modified: 2024-12-13 14:52 UTC (History)
8 users (show)

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


Attachments
Bug 37395: Fix columns visibility on Vue tables (3.08 KB, patch)
2024-09-24 12:26 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 37395: Fix columns visibility on Vue tables (3.13 KB, patch)
2024-09-26 14:24 UTC, Olivier Vezina
Details | Diff | Splinter Review
Bug 37395: Fix columns visibility on Vue tables (3.19 KB, patch)
2024-10-22 11:53 UTC, Pedro Amorim
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Garcia 2024-07-17 16:05:21 UTC
To recreate: 
1. Administration -> System Preferences
2. Search for ERMModule -> Enable
3. E-resource management -> Agreements -> Configure
4. Check "is hidden by default" on any of the columns
5. Go back to the Agreements table and notice the columns are not hidden
6. Repeat with other tables in ERM
Comment 1 Jonathan Druart 2024-09-24 12:26:22 UTC
Created attachment 171925 [details] [review]
Bug 37395: Fix columns visibility on Vue tables

On bug 33066 we reworked a lot of datatables.js to make the JS function
reusable from the Vue component (and especially the KohaTable
component). I guess the regression comes from this change, but I am
surprised that we didn't catch it when testing.

The was a mistake for _dt_visibility, we didn't pass the node. Actually
we cannot pass it as we do not have it yet.

This "node" variable is only used when bKohaColumnsUseNames is passed
(ie. we do not rely on the order of the columns but we need to rely on
their data-colname attributes).

There is then a limitation here: we cannot use bKohaColumnsUseNames from
Vue, but we do not yet.

An ideal fix would be too big for now, especially for an hypothetic use
case.

Test plan:
Confirm that the "Columns" button are now back for the tables of the Vue
apps (ERM, Preservation) and that the settings are taken into account
(hide by default, etc.)
Comment 2 Olivier Vezina 2024-09-26 14:24:52 UTC
Created attachment 171978 [details] [review]
Bug 37395: Fix columns visibility on Vue tables

On bug 33066 we reworked a lot of datatables.js to make the JS function
reusable from the Vue component (and especially the KohaTable
component). I guess the regression comes from this change, but I am
surprised that we didn't catch it when testing.

The was a mistake for _dt_visibility, we didn't pass the node. Actually
we cannot pass it as we do not have it yet.

This "node" variable is only used when bKohaColumnsUseNames is passed
(ie. we do not rely on the order of the columns but we need to rely on
their data-colname attributes).

There is then a limitation here: we cannot use bKohaColumnsUseNames from
Vue, but we do not yet.

An ideal fix would be too big for now, especially for an hypothetic use
case.

Test plan:
Confirm that the "Columns" button are now back for the tables of the Vue
apps (ERM, Preservation) and that the settings are taken into account
(hide by default, etc.)

Signed-off-by: Olivier V <olivier.vezina@inLibro.com>
Comment 3 Pedro Amorim 2024-10-22 11:53:07 UTC
Created attachment 173130 [details] [review]
Bug 37395: Fix columns visibility on Vue tables

On bug 33066 we reworked a lot of datatables.js to make the JS function
reusable from the Vue component (and especially the KohaTable
component). I guess the regression comes from this change, but I am
surprised that we didn't catch it when testing.

The was a mistake for _dt_visibility, we didn't pass the node. Actually
we cannot pass it as we do not have it yet.

This "node" variable is only used when bKohaColumnsUseNames is passed
(ie. we do not rely on the order of the columns but we need to rely on
their data-colname attributes).

There is then a limitation here: we cannot use bKohaColumnsUseNames from
Vue, but we do not yet.

An ideal fix would be too big for now, especially for an hypothetic use
case.

Test plan:
Confirm that the "Columns" button are now back for the tables of the Vue
apps (ERM, Preservation) and that the settings are taken into account
(hide by default, etc.)

Signed-off-by: Olivier V <olivier.vezina@inLibro.com>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Comment 4 Katrin Fischer 2024-10-23 17:18:41 UTC
Pushed for 24.11!

Well done everyone, thank you!
Comment 5 Lucas Gass (lukeg) 2024-11-20 18:29:50 UTC
Backported to 24.05.x for upcoming 24.05.06
Comment 6 Fridolin Somers 2024-12-13 14:52:10 UTC
Does not apply on 23.11.x maybe because of Bug 33568