Bug 33705 - Tables have configure button even if they are not configurable
Summary: Tables have configure button even if they are not configurable
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low normal
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
Depends on: 29723 31435 33066
Blocks:
  Show dependency treegraph
 
Reported: 2023-05-09 20:31 UTC by Caroline Cyr La Rose
Modified: 2023-12-28 20:47 UTC (History)
2 users (show)

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


Attachments
Bug 33705: (bug 33066 follow-up) Fix 'configure' button for kohaTable (1.84 KB, patch)
2023-05-10 04:37 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 33705: (bug 33066 follow-up) Fix 'configure' button for kohaTable (1.91 KB, patch)
2023-05-10 13:23 UTC, Caroline Cyr La Rose
Details | Diff | Splinter Review
Bug 33705: (bug 33066 follow-up) Fix 'configure' button for kohaTable (1.97 KB, patch)
2023-05-16 00:30 UTC, Victor Grousset/tuxayo
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Caroline Cyr La Rose 2023-05-09 20:31:41 UTC
I'm not sure if bug 31435 was meant as a general fix or if each individual table needs to be fixed... The Quote of the day table has the "Configure" button, and it leads to the column configuration page, but that table is not in the list.

To test:
-  Make sure you have quotes, add at least one, or add the sample quotes during installation, or load the installer/data/mysql/en/optional/sample_quotes.yml file

1. Go to Tools > Quote editor
2. Click "Configure"
   --> You are brought to the column settings page, but the quote editor table is not there
Comment 1 Jonathan Druart 2023-05-10 04:32:51 UTC
Caused by
  commit 765fd1ced3b9efc4ff6fb71e2fee1a7a227d1cae
  Bug 33066: Introduce a KohaTable Vue component
Comment 2 Jonathan Druart 2023-05-10 04:37:44 UTC
Created attachment 150922 [details] [review]
Bug 33705: (bug 33066 follow-up) Fix 'configure' button for kohaTable

The 'configure' button is displayed for any tables, even those that
cannot be configured.

This is a regression caused by
  commit 765fd1ced3b9efc4ff6fb71e2fee1a7a227d1cae
  Bug 33066: Introduce a KohaTable Vue component

It's adding a default value for table_settings, but then later we are
testing if table_settings is true:
699     let table_settings = params.table_settings || {};
...
798     if ( table_settings && CAN_user_parameters_manage_column_config ) {

This patch is reverting the default value, so the test will be
corrected.

Test plan:
1. Go to Tools > Quote editor
2. Click "Configure"
=> Without this patch you are brought to the column settings page, but the quote editor table is not there
=> With this patch the button is not present
3. Go to the cities page (admin/cities.pl)
4. Click "Configure"
=> You are brought to the column settings page
Comment 3 Caroline Cyr La Rose 2023-05-10 13:23:42 UTC
Created attachment 151000 [details] [review]
Bug 33705: (bug 33066 follow-up) Fix 'configure' button for kohaTable

The 'configure' button is displayed for any tables, even those that
cannot be configured.

This is a regression caused by
  commit 765fd1ced3b9efc4ff6fb71e2fee1a7a227d1cae
  Bug 33066: Introduce a KohaTable Vue component

It's adding a default value for table_settings, but then later we are
testing if table_settings is true:
699     let table_settings = params.table_settings || {};
...
798     if ( table_settings && CAN_user_parameters_manage_column_config ) {

This patch is reverting the default value, so the test will be
corrected.

Test plan:
1. Go to Tools > Quote editor
2. Click "Configure"
=> Without this patch you are brought to the column settings page, but the quote editor table is not there
=> With this patch the button is not present
3. Go to the cities page (admin/cities.pl)
4. Click "Configure"
=> You are brought to the column settings page

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Comment 4 Victor Grousset/tuxayo 2023-05-16 00:30:29 UTC
Created attachment 151232 [details] [review]
Bug 33705: (bug 33066 follow-up) Fix 'configure' button for kohaTable

The 'configure' button is displayed for any tables, even those that
cannot be configured.

This is a regression caused by
  commit 765fd1ced3b9efc4ff6fb71e2fee1a7a227d1cae
  Bug 33066: Introduce a KohaTable Vue component

It's adding a default value for table_settings, but then later we are
testing if table_settings is true:
699     let table_settings = params.table_settings || {};
...
798     if ( table_settings && CAN_user_parameters_manage_column_config ) {

This patch is reverting the default value, so the test will be
corrected.

Test plan:
1. Go to Tools > Quote editor
2. Click "Configure"
=> Without this patch you are brought to the column settings page, but the quote editor table is not there
=> With this patch the button is not present
3. Go to the cities page (admin/cities.pl)
4. Click "Configure"
=> You are brought to the column settings page

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Comment 5 Victor Grousset/tuxayo 2023-05-16 01:27:36 UTC
Works, makes sense, QA script happy, code looks good, passing QA :)
Comment 6 Jonathan Druart 2023-05-16 09:51:52 UTC
Pushed to master for 23.05
Comment 7 Pedro Amorim 2023-06-07 10:16:38 UTC
Nice work everyone!

Pushed to 22.11.x for next release