Bug 39053

Summary: Add page-section div to reports results pages
Product: Koha Reporter: Owen Leonard <oleonard>
Component: TemplatesAssignee: Owen Leonard <oleonard>
Status: Pushed to main --- QA Contact: Marcel de Rooy <m.de.rooy>
Severity: minor    
Priority: P5 - low CC: david, m.de.rooy
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
This fixes several report result pages so that they have a "page-section" div - they now have a white background, instead of the light grey background.
Version(s) released in:
25.05.00
Circulation function:
Bug Depends on: 30952    
Bug Blocks:    
Attachments: Bug 39053: Add page-section div to reports results pages
Bug 39053: Add page-section div to reports results pages
Bug 39053: Add page-section div to reports results pages
Bug 39053: Add page-section div to reports results pages

Description Owen Leonard 2025-02-06 14:19:24 UTC
Many reports pages lack the <div class="page-section"> wrapper around the table of results.
Comment 1 Owen Leonard 2025-02-06 14:27:33 UTC
Created attachment 177579 [details] [review]
Bug 39053: Add page-section div to reports results pages

This patch adds a "page-section" wrapping div around reports results
pages where it is missing.

Note: This patch contains indentation changes.

To test, apply the patch and test the following reports, confirming that
the results page looks correct:

- Patrons with the most checkouts
- Acquisitions statistics
- Patrons with no checkouts
- Patrons statistics
- Most-circulated items
- Catalog statistics
- Average loan time
- Circulation statistics
- Lost items
- Catalog by item types
- Holds statistics

Sponsored-by: Athens County Public Libraries
Comment 2 David Nind 2025-02-08 08:31:38 UTC
Created attachment 177658 [details] [review]
Bug 39053: Add page-section div to reports results pages

This patch adds a "page-section" wrapping div around reports results
pages where it is missing.

Note: This patch contains indentation changes.

To test, apply the patch and test the following reports, confirming that
the results page looks correct:

- Patrons with the most checkouts
- Acquisitions statistics
- Patrons with no checkouts
- Patrons statistics
- Most-circulated items
- Catalog statistics
- Average loan time
- Circulation statistics
- Lost items
- Catalog by item types
- Holds statistics

Sponsored-by: Athens County Public Libraries
Signed-off-by: David Nind <david@davidnind.com>
Comment 3 David Nind 2025-02-08 08:37:20 UTC
Testing notes (using KTD):

1. The database strict mode needs to be turne doff for these reports to work:
   - Patrons with the most checkouts
   - Patrons with no checkouts

2. To turn off the database strict mode:
   - vi /etc/koha/sites/kohadev/koha-conf.xml
   - Search for strict
   - Change strict_sql_modes from 1 to 0: <strict_sql_modes>0</strict_sql_modes>
   - Restart everything: restart_all

3. Add some appropriate data so that the "Lost items" reports is generated:
   - Edit an item for a record so that it has a lost status of "Lost"
   - For the report options for Library: change to "All"
Comment 4 Owen Leonard 2025-02-12 16:37:09 UTC
Created attachment 177943 [details] [review]
Bug 39053: Add page-section div to reports results pages

This patch adds a "page-section" wrapping div around reports results
pages where it is missing.

Note: This patch contains indentation changes.

To test, apply the patch and test the following reports, confirming that
the results page looks correct:

- Patrons with the most checkouts
- Acquisitions statistics
- Patrons with no checkouts
- Patrons statistics
- Most-circulated items
- Catalog statistics
- Average loan time
- Circulation statistics
- Lost items
- Catalog by item types
- Holds statistics

Sponsored-by: Athens County Public Libraries
Signed-off-by: David Nind <david@davidnind.com>
Comment 5 Marcel de Rooy 2025-02-14 08:41:42 UTC
Created attachment 178084 [details] [review]
Bug 39053: Add page-section div to reports results pages

This patch adds a "page-section" wrapping div around reports results
pages where it is missing.

Note: This patch contains indentation changes.

To test, apply the patch and test the following reports, confirming that
the results page looks correct:

- Patrons with the most checkouts
- Acquisitions statistics
- Patrons with no checkouts
- Patrons statistics
- Most-circulated items
- Catalog statistics
- Average loan time
- Circulation statistics
- Lost items
- Catalog by item types
- Holds statistics

Sponsored-by: Athens County Public Libraries
Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 6 Katrin Fischer 2025-02-17 13:59:16 UTC
Hi, this fails the QA check for me, can you please have a look?

 FAIL	koha-tmpl/intranet-tmpl/prog/en/modules/reports/acquisitions_stats.tt
   FAIL	  tt_valid
		lines 93, 272

 FAIL	koha-tmpl/intranet-tmpl/prog/en/modules/reports/issues_avg_stats.tt
   FAIL	  tt_valid
		lines 63, 65, 200
Comment 7 Marcel de Rooy 2025-02-17 14:00:43 UTC
Could this be a non-issue? Joubu told that qa script still needs attention on that front..
Comment 8 Katrin Fischer 2025-02-17 14:05:47 UTC
I am not sure really, hence the question to have another look. 

All tidy related patches should be pushed now and I have made sure (hopefully) to have the newest versions. As Owen worked on the tidy, it might be easier for him to determine.
Comment 9 Owen Leonard 2025-02-18 12:08:30 UTC
(In reply to Marcel de Rooy from comment #7)
> Joubu told that qa script still needs attention
> on that front..

That was my assumption when submitting the patch: "Important: ignore tt_valid QA test failures for now" https://chat.koha-community.org/koha-community/pl/ihyw6dj7ptg9iczcbxa4pjesue
Comment 10 Katrin Fischer 2025-02-18 13:38:05 UTC
(In reply to Owen Leonard from comment #9)
> (In reply to Marcel de Rooy from comment #7)
> > Joubu told that qa script still needs attention
> > on that front..
> 
> That was my assumption when submitting the patch: "Important: ignore
> tt_valid QA test failures for now"
> https://chat.koha-community.org/koha-community/pl/ihyw6dj7ptg9iczcbxa4pjesue

Ok, not a blocker then. Thanks for verifying :)
Comment 11 Katrin Fischer 2025-02-19 16:07:49 UTC
Pushed for 25.05!

Well done everyone, thank you!