Bug 38482 - Disable save state for items tables
Summary: Disable save state for items tables
Status: Pushed to main
Alias: None
Product: Koha
Classification: Unclassified
Component: Staff interface (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
Depends on: 33484 38436
Blocks: 38433 38485
  Show dependency treegraph
 
Reported: 2024-11-19 09:29 UTC by Jonathan Druart
Modified: 2024-11-20 13:21 UTC (History)
2 users (show)

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


Attachments
Bug 38482: Remove save state for the holdings tables (3.85 KB, patch)
2024-11-19 09:38 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 38482: Remove save state for the holdings tables (3.89 KB, patch)
2024-11-19 10:48 UTC, Biblibre Sandboxes
Details | Diff | Splinter Review
Bug 38482: Remove save state for the holdings tables (3.91 KB, patch)
2024-11-19 11:10 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 38482: Remove save state for the holdings tables (3.96 KB, patch)
2024-11-19 11:59 UTC, Philip Orr
Details | Diff | Splinter Review
Bug 38482: Deactivate 'save state' for holdings tables (1.63 KB, patch)
2024-11-19 14:16 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Druart 2024-11-19 09:29:02 UTC
On the holdings table of the bibliographic record detail page, we have a special behaviour: we hide columns if there is no data to display. Indeed we have a lot of column and we want to limit the number of columns displayed.

This behaviour conflicts with "Save state": when the columns are hidden the state is modified. If you leave the page and come back, the column will stay hidden, even if the global settings does not have it as hidden and even if the user didn't explicitly hide it.

We want to implement something correctly to prevent a conflict with those 2 behaviours, but 24.11.00 is coming and we need a quick fix: here we are going to remove save state for these 2 tables.
Comment 1 Jonathan Druart 2024-11-19 09:38:43 UTC
Created attachment 174764 [details] [review]
Bug 38482: Remove save state for the holdings tables

On the holdings table of the bibliographic record detail page, we have a special
behaviour: we hide columns if there is no data to display. Indeed we have a lot
of column and we want to limit the number of columns displayed.

This behaviour conflicts with "Save state": when the columns are hidden the
state is modified. If you leave the page and come back, the column will stay
hidden, even if the global settings does not have it as hidden and even if the
user didn't explicitly hide it.

We want to implement something correctly to prevent a conflict with those 2
behaviours, but 24.11.00 is coming and we need a quick fix: here we are going to
remove save state for these 2 tables.

Test plan:
Apply this patch, restart_all
Go to the tables settings admin, jump to holdings_table
Notice that "Save configuration state on page change" is turned off by default
Go to catalogue/detail.plbiblionumber=13 (item does not have call number)
=> "Call number" column is not displayed
Edit the item, set a call number
Go to catalogue/detail.plbiblionumber=13 (item has call number)
=> "Call number" column is displayed

Go to the tables settings admin, jump to holdings_table
Turn on "Save configuration state on page change"
Go to catalogue/detail.plbiblionumber=1 (item does not have call number)
=> "Call number" column is not displayed
Edit the item, set a call number
Go to catalogue/detail.plbiblionumber=13 (item does not have call number)
=> "Call number" column is still not displayed

This can be considered a bug, that why we are disabling the feature for this
table.
Comment 2 Michaela Sieber 2024-11-19 10:18:36 UTC
It doesn not work for me.
Tested in a sandbox and 
"Save configuration state on page change" is still turned on by default
Comment 3 Biblibre Sandboxes 2024-11-19 10:48:03 UTC
Created attachment 174784 [details] [review]
Bug 38482: Remove save state for the holdings tables

On the holdings table of the bibliographic record detail page, we have a special
behaviour: we hide columns if there is no data to display. Indeed we have a lot
of column and we want to limit the number of columns displayed.

This behaviour conflicts with "Save state": when the columns are hidden the
state is modified. If you leave the page and come back, the column will stay
hidden, even if the global settings does not have it as hidden and even if the
user didn't explicitly hide it.

We want to implement something correctly to prevent a conflict with those 2
behaviours, but 24.11.00 is coming and we need a quick fix: here we are going to
remove save state for these 2 tables.

Test plan:
Apply this patch, restart_all
Go to the tables settings admin, jump to holdings_table
Notice that "Save configuration state on page change" is turned off by default
Go to catalogue/detail.plbiblionumber=13 (item does not have call number)
=> "Call number" column is not displayed
Edit the item, set a call number
Go to catalogue/detail.plbiblionumber=13 (item has call number)
=> "Call number" column is displayed

Go to the tables settings admin, jump to holdings_table
Turn on "Save configuration state on page change"
Go to catalogue/detail.plbiblionumber=1 (item does not have call number)
=> "Call number" column is not displayed
Edit the item, set a call number
Go to catalogue/detail.plbiblionumber=13 (item does not have call number)
=> "Call number" column is still not displayed

This can be considered a bug, that why we are disabling the feature for this
table.

Signed-off-by: joubu <xxx@example.org>
Comment 4 Katrin Fischer 2024-11-19 10:50:44 UTC
I think this is the right idea for now. Thanks!
Comment 5 Michaela Sieber 2024-11-19 10:53:15 UTC
Fixed the sandbox with Joubu and testet it.

"Save configuration state on page change" is now turned off by default
for admin tables settings > holdings_table and otherholdings_table

Change status to signed off.
Further tests are welcome!
Comment 6 Jonathan Druart 2024-11-19 11:10:04 UTC
Created attachment 174785 [details] [review]
Bug 38482: Remove save state for the holdings tables

On the holdings table of the bibliographic record detail page, we have a special
behaviour: we hide columns if there is no data to display. Indeed we have a lot
of column and we want to limit the number of columns displayed.

This behaviour conflicts with "Save state": when the columns are hidden the
state is modified. If you leave the page and come back, the column will stay
hidden, even if the global settings does not have it as hidden and even if the
user didn't explicitly hide it.

We want to implement something correctly to prevent a conflict with those 2
behaviours, but 24.11.00 is coming and we need a quick fix: here we are going to
remove save state for these 2 tables.

Test plan:
Apply this patch, restart_all
Go to the tables settings admin, jump to holdings_table
Notice that "Save configuration state on page change" is turned off by default
Go to catalogue/detail.plbiblionumber=13 (item does not have call number)
=> "Call number" column is not displayed
Edit the item, set a call number
Go to catalogue/detail.plbiblionumber=13 (item has call number)
=> "Call number" column is displayed

Go to the tables settings admin, jump to holdings_table
Turn on "Save configuration state on page change"
Go to catalogue/detail.plbiblionumber=1 (item does not have call number)
=> "Call number" column is not displayed
Edit the item, set a call number
Go to catalogue/detail.plbiblionumber=13 (item does not have call number)
=> "Call number" column is still not displayed

This can be considered a bug, that why we are disabling the feature for this
table.

Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Comment 7 Philip Orr 2024-11-19 11:59:56 UTC
Created attachment 174786 [details] [review]
Bug 38482: Remove save state for the holdings tables

On the holdings table of the bibliographic record detail page, we have a special
behaviour: we hide columns if there is no data to display. Indeed we have a lot
of column and we want to limit the number of columns displayed.

This behaviour conflicts with "Save state": when the columns are hidden the
state is modified. If you leave the page and come back, the column will stay
hidden, even if the global settings does not have it as hidden and even if the
user didn't explicitly hide it.

We want to implement something correctly to prevent a conflict with those 2
behaviours, but 24.11.00 is coming and we need a quick fix: here we are going to
remove save state for these 2 tables.

Test plan:
Apply this patch, restart_all
Go to the tables settings admin, jump to holdings_table
Notice that "Save configuration state on page change" is turned off by default
Go to catalogue/detail.plbiblionumber=13 (item does not have call number)
=> "Call number" column is not displayed
Edit the item, set a call number
Go to catalogue/detail.plbiblionumber=13 (item has call number)
=> "Call number" column is displayed

Go to the tables settings admin, jump to holdings_table
Turn on "Save configuration state on page change"
Go to catalogue/detail.plbiblionumber=1 (item does not have call number)
=> "Call number" column is not displayed
Edit the item, set a call number
Go to catalogue/detail.plbiblionumber=13 (item does not have call number)
=> "Call number" column is still not displayed

This can be considered a bug, that why we are disabling the feature for this
table.

Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: PhilipOrr <philip.orr@lmscloud.de>
Comment 8 Jonathan Druart 2024-11-19 14:16:51 UTC
Created attachment 174791 [details] [review]
Bug 38482: Deactivate 'save state' for holdings tables

This is too complicated (at least for 24.11.00) to have everything works
in all situations.

This table has this specific "hide when empty" behaviour which
complicated how we deal with/restore the state
Comment 9 Katrin Fischer 2024-11-20 13:21:37 UTC
Pushed for 24.11!

Well done everyone, thank you!