Bug 38192 - State not restored correctly on suggestion tables
Summary: State not restored correctly on suggestion tables
Status: RESOLVED FIXED
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: Martin Renvoize (ashimema)
URL:
Keywords:
Depends on: 38183 33426
Blocks: 33484
  Show dependency treegraph
 
Reported: 2024-10-17 09:52 UTC by Jonathan Druart
Modified: 2024-11-20 23:21 UTC (History)
3 users (show)

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


Attachments
Bug 38192: Fix restoration of table state for suggestion tables (9.79 KB, patch)
2024-10-17 10:20 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 38192: Fix restoration of table state for suggestion tables (9.79 KB, patch)
2024-10-17 12:02 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 38192: Fix restoration of table state for suggestion tables (9.84 KB, patch)
2024-10-17 13:51 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 38192: Fix restoration of table state for suggestion tables (9.90 KB, patch)
2024-10-25 12:24 UTC, Martin Renvoize (ashimema)
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-10-17 09:52:28 UTC
There is one table per tab, the id of the table is table_N.

Say you have:
Pending (#table_1), Accepted (#table_2), Rejected (#table_3)
The state will be stored in localStorage with the following key:
DataTables_table_1_/cgi-bin/koha/suggestion/suggestion.pl
DataTables_table_2_/cgi-bin/koha/suggestion/suggestion.pl
DataTables_table_3_/cgi-bin/koha/suggestion/suggestion.pl

If you move all the suggestions from Accepted to Rejected, a shift will give:
Pending (#table_1), Rejected (#table_2)
And the previous state from the "Accepted" tab will be used for "Rejected"
Comment 1 Jonathan Druart 2024-10-17 10:20:26 UTC
Created attachment 172862 [details] [review]
Bug 38192: Fix restoration of table state for suggestion tables

There is one table per tab, the id of the table is table_N.

Say you have:
Pending (#table_1), Accepted (#table_2), Rejected (#table_3)
The state will be stored in localStorage with the following key:
DataTables_table_1_/cgi-bin/koha/suggestion/suggestion.pl
DataTables_table_2_/cgi-bin/koha/suggestion/suggestion.pl
DataTables_table_3_/cgi-bin/koha/suggestion/suggestion.pl

If you move all the suggestions from Accepted to Rejected, a shift will give:
Pending (#table_1), Rejected (#table_2)
And the previous state from the "Accepted" tab will be used for "Rejected"

Test plan:
Confirm the above, have several tabs then remove one by moving the
all suggestions to an other tab.
Test the other features on the edit and list views:
change status, update manager, etc.
Comment 2 Jonathan Druart 2024-10-17 12:02:16 UTC
Created attachment 172868 [details] [review]
Bug 38192: Fix restoration of table state for suggestion tables

There is one table per tab, the id of the table is table_N.

Say you have:
Pending (#table_1), Accepted (#table_2), Rejected (#table_3)
The state will be stored in localStorage with the following key:
DataTables_table_1_/cgi-bin/koha/suggestion/suggestion.pl
DataTables_table_2_/cgi-bin/koha/suggestion/suggestion.pl
DataTables_table_3_/cgi-bin/koha/suggestion/suggestion.pl

If you move all the suggestions from Accepted to Rejected, a shift will give:
Pending (#table_1), Rejected (#table_2)
And the previous state from the "Accepted" tab will be used for "Rejected"

Test plan:
Confirm the above, have several tabs then remove one by moving the
all suggestions to an other tab.
Test the other features on the edit and list views:
change status, update manager, etc.
Comment 3 Owen Leonard 2024-10-17 13:51:01 UTC
Created attachment 172879 [details] [review]
Bug 38192: Fix restoration of table state for suggestion tables

There is one table per tab, the id of the table is table_N.

Say you have:
Pending (#table_1), Accepted (#table_2), Rejected (#table_3)
The state will be stored in localStorage with the following key:
DataTables_table_1_/cgi-bin/koha/suggestion/suggestion.pl
DataTables_table_2_/cgi-bin/koha/suggestion/suggestion.pl
DataTables_table_3_/cgi-bin/koha/suggestion/suggestion.pl

If you move all the suggestions from Accepted to Rejected, a shift will
give: Pending (#table_1), Rejected (#table_2) And the previous state
from the "Accepted" tab will be used for "Rejected"

Test plan:
Confirm the above, have several tabs then remove one by moving the
all suggestions to an other tab.

Test the other features on the edit and list views:
change status, update manager, etc.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 4 Martin Renvoize (ashimema) 2024-10-25 12:24:13 UTC
Created attachment 173352 [details] [review]
Bug 38192: Fix restoration of table state for suggestion tables

There is one table per tab, the id of the table is table_N.

Say you have:
Pending (#table_1), Accepted (#table_2), Rejected (#table_3)
The state will be stored in localStorage with the following key:
DataTables_table_1_/cgi-bin/koha/suggestion/suggestion.pl
DataTables_table_2_/cgi-bin/koha/suggestion/suggestion.pl
DataTables_table_3_/cgi-bin/koha/suggestion/suggestion.pl

If you move all the suggestions from Accepted to Rejected, a shift will
give: Pending (#table_1), Rejected (#table_2) And the previous state
from the "Accepted" tab will be used for "Rejected"

Test plan:
Confirm the above, have several tabs then remove one by moving the
all suggestions to an other tab.

Test the other features on the edit and list views:
change status, update manager, etc.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 5 Katrin Fischer 2024-10-25 13:39:07 UTC
Pushed for 24.11!

Well done everyone, thank you!
Comment 6 Lucas Gass (lukeg) 2024-11-20 23:21:27 UTC
Doesn't apply clean to 24.05.x, no backport.