Bug 38594

Summary: Table settings for courses reserves not working in the OPAC
Product: Koha Reporter: Jonathan Druart <jonathan.druart>
Component: OPACAssignee: Jonathan Druart <jonathan.druart>
Status: Pushed to stable --- QA Contact: Lucas Gass (lukeg) <lucas>
Severity: normal    
Priority: P5 - low CC: david, lucas, wainuiwitikapark
Version: Main   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: Small patch Documentation contact:
Documentation submission: Text to go in the release notes:
This fixes the OPAC course reserves table. The table settings were not taken into account when displaying the table, for example, hidden columns were still shown.
Version(s) released in:
25.05.00,24.11.01
Circulation function:
Bug Depends on:    
Bug Blocks: 26553    
Attachments: Bug 38594: Fix table settings on the course reserves tables - OPAC
Bug 38594: Remove unused TablesSettings.GetColumns
Bug 38594: Fix table settings on the course reserves tables - OPAC
Bug 38594: Remove unused TablesSettings.GetColumns
Bug 38594: Fix table settings on the course reserves tables - OPAC
Bug 38594: Remove unused TablesSettings.GetColumns

Description Jonathan Druart 2024-12-02 10:19:26 UTC

    
Comment 1 Jonathan Druart 2024-12-02 10:25:55 UTC
Created attachment 175045 [details] [review]
Bug 38594: Fix table settings on the course reserves tables - OPAC

We are passing the columns settings, but KohaTable is expecting the
table settings.

Test plan:
Hide some columns for the course reserves table at the OPAC
Define a course, add 1+ items
Go to the OPAC, "Course reserves"
Notice that with this patch the columns are correctly hidden by default.
Comment 2 Jonathan Druart 2024-12-02 10:25:57 UTC
Created attachment 175046 [details] [review]
Bug 38594: Remove unused TablesSettings.GetColumns

This is no longer used, and should not.

Test plan:
  git grep TablesSettings.GetColumns
should not return any results

  git grep GetColumns
should not return results related to this method
Comment 3 Owen Leonard 2024-12-02 17:09:55 UTC
Created attachment 175055 [details] [review]
Bug 38594: Fix table settings on the course reserves tables - OPAC

We are passing the columns settings, but KohaTable is expecting the
table settings.

Test plan:
Hide some columns for the course reserves table at the OPAC
Define a course, add 1+ items
Go to the OPAC, "Course reserves"
Notice that with this patch the columns are correctly hidden by default.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 4 Owen Leonard 2024-12-02 17:09:57 UTC
Created attachment 175056 [details] [review]
Bug 38594: Remove unused TablesSettings.GetColumns

This is no longer used, and should not.

Test plan:
  git grep TablesSettings.GetColumns
should not return any results

  git grep GetColumns
should not return results related to this method

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 5 Lucas Gass (lukeg) 2024-12-02 18:22:48 UTC
Created attachment 175060 [details] [review]
Bug 38594: Fix table settings on the course reserves tables - OPAC

We are passing the columns settings, but KohaTable is expecting the
table settings.

Test plan:
Hide some columns for the course reserves table at the OPAC
Define a course, add 1+ items
Go to the OPAC, "Course reserves"
Notice that with this patch the columns are correctly hidden by default.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Comment 6 Lucas Gass (lukeg) 2024-12-02 18:22:50 UTC
Created attachment 175061 [details] [review]
Bug 38594: Remove unused TablesSettings.GetColumns

This is no longer used, and should not.

Test plan:
  git grep TablesSettings.GetColumns
should not return any results

  git grep GetColumns
should not return results related to this method

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Comment 7 Katrin Fischer 2024-12-03 16:36:36 UTC
Pushed for 25.05!

Well done everyone, thank you!
Comment 8 Paul Derscheid 2024-12-12 13:31:29 UTC
Nice work everyone!

Pushed to 24.11.x for 24.11.01
Comment 9 Wainui Witika-Park 2024-12-17 05:41:16 UTC
Could I please get a more detailed test plan for 24.05.x? :)
Comment 10 Jonathan Druart 2024-12-17 09:21:16 UTC
(In reply to Wainui Witika-Park from comment #9)
> Could I please get a more detailed test plan for 24.05.x? :)

You can ignore the second patch as it is only removing dead code (and maybe not dead in 24.05.x, I have not confirmed that).

For the first patch try the following steps:

Go to the Table settings administration page, under the "OPAC" tab you have the configuration for the course_items table (http://localhost:8081/cgi-bin/koha/admin/columns_settings.pl#course_items)
Tick Title to make it hidden by default.
Define a course and add at least one item
At the OPAC, under "Course reserves" you should see the table with the column hidden by default.

Without this patch the column is not hidden (ie. the settings are not taken into account)
Comment 11 Wainui Witika-Park 2024-12-17 21:58:30 UTC
(In reply to Jonathan Druart from comment #10)
> (In reply to Wainui Witika-Park from comment #9)
> > Could I please get a more detailed test plan for 24.05.x? :)
> 
> You can ignore the second patch as it is only removing dead code (and maybe
> not dead in 24.05.x, I have not confirmed that).
> 
> For the first patch try the following steps:
> 
> Go to the Table settings administration page, under the "OPAC" tab you have
> the configuration for the course_items table
> (http://localhost:8081/cgi-bin/koha/admin/columns_settings.pl#course_items)
> Tick Title to make it hidden by default.
> Define a course and add at least one item
> At the OPAC, under "Course reserves" you should see the table with the
> column hidden by default.
> 
> Without this patch the column is not hidden (ie. the settings are not taken
> into account)

Thanks Jonathan!

Unfortunately the columns are still not being hidden correctly by the settings.
Comment 12 Wainui Witika-Park 2024-12-19 22:16:57 UTC
Not backporting to 24.05.x