Bug 35820

Summary: Table on Hold ratios page at circ/reserveratios.pl has wrong id
Product: Koha Reporter: Jason Robb <jrobb>
Component: TemplatesAssignee: Owen Leonard <oleonard>
Status: CLOSED FIXED QA Contact: Marcel de Rooy <m.de.rooy>
Severity: trivial    
Priority: P5 - low CC: david, fridolin.somers, lucas, m.de.rooy
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:
Version(s) released in:
24.05.00,23.11.03
Circulation function:
Attachments: Bug 35820: Fix table id on hold ratios page
Bug 35820: Fix table id on hold ratios page
Bug 35820: Fix table id on hold ratios page

Description Jason Robb 2024-01-16 15:52:30 UTC
The table at circ/reserveratios.pl currently has an id of "holdst". The table settings page says that table id should be "holds-ratios".

"holdst" is the id for the holds queue table at circ/view_holdsqueue.pl.
Comment 1 Owen Leonard 2024-01-17 12:05:45 UTC
Created attachment 161096 [details] [review]
Bug 35820: Fix table id on hold ratios page

This patch corrects the ID on the table showing holds on the holds
ratios page so that it matches the DataTables initialization and
configuration. I'm not aware of any bug with the functionality, but
consistency is good.

The patch also wraps the table in a "page-section" div, an update which
includes indentation changes.

To test, apply the patch and if necessary, place multiple holds on a
title so that the hold ratios page will display results.

- Go to Circulation -> Hold ratios.
- The table of hold ratios should look correct.
- Click the "Configure" button at the top of the table.
- On the table settings page, change the default visibility of some
  columns.
- Return to the hold ratios page to confirm that the correct columns are
  hidden by default.
Comment 2 David Nind 2024-01-17 13:02:22 UTC
Created attachment 161102 [details] [review]
Bug 35820: Fix table id on hold ratios page

This patch corrects the ID on the table showing holds on the holds
ratios page so that it matches the DataTables initialization and
configuration. I'm not aware of any bug with the functionality, but
consistency is good.

The patch also wraps the table in a "page-section" div, an update which
includes indentation changes.

To test, apply the patch and if necessary, place multiple holds on a
title so that the hold ratios page will display results.

- Go to Circulation -> Hold ratios.
- The table of hold ratios should look correct.
- Click the "Configure" button at the top of the table.
- On the table settings page, change the default visibility of some
  columns.
- Return to the hold ratios page to confirm that the correct columns are
  hidden by default.

Signed-off-by: David Nind <david@davidnind.com>
Comment 3 David Nind 2024-01-17 13:09:10 UTC
Testing notes using KTD:

1. Place four holds on a record.

2. To get the report to display I needed to:
   2.1 Edit /etc/koha/sites/kohadev/koha-conf.xml
   2.2 Change strict mode to 0: <strict_sql_modes>0</strict_sql_modes>
   2.3 Restart everything
   2.4 Otherwise, I get the group by error trace:
CGI::Compile::ROOT::kohadevbox_koha_circ_reserveratios_2epl::reserveratios_2epl(): DBI Exception: DBD::mysql::st execute failed: 'koha_kohadev.reserves.reservedate' isn't in GROUP BY at /usr/share/perl5/CGI/Emulate/PSGI.pm line 30
 at /usr/share/perl5/DBIx/Class/Exception.pm line 77

Additional things noted - both before and after the patch:

1. Row alignment - these columns are in the center, whereas all the other columns are aligned to the top of the row:
   - Holds
   - Items
   - Items needed

2. The item type column is labelled 'Itype', should be labelled as 'Item type'.
Comment 4 Marcel de Rooy 2024-01-19 11:00:58 UTC
Created attachment 161206 [details] [review]
Bug 35820: Fix table id on hold ratios page

This patch corrects the ID on the table showing holds on the holds
ratios page so that it matches the DataTables initialization and
configuration. I'm not aware of any bug with the functionality, but
consistency is good.

The patch also wraps the table in a "page-section" div, an update which
includes indentation changes.

To test, apply the patch and if necessary, place multiple holds on a
title so that the hold ratios page will display results.

- Go to Circulation -> Hold ratios.
- The table of hold ratios should look correct.
- Click the "Configure" button at the top of the table.
- On the table settings page, change the default visibility of some
  columns.
- Return to the hold ratios page to confirm that the correct columns are
  hidden by default.

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 5 Katrin Fischer 2024-01-26 14:18:15 UTC
Pushed for 24.05!

Well done everyone, thank you!
Comment 6 Fridolin Somers 2024-01-31 14:11:53 UTC
Pushed to 23.11.x for 23.11.03
Comment 7 Lucas Gass (lukeg) 2024-02-09 20:39:15 UTC
Doesn't apply cleanly for 23.05.x, no backport