Bug 27513 - Add description to reports page
Summary: Add description to reports page
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Reports (show other bugs)
Version: Main
Hardware: All All
: P5 - low minor (vote)
Assignee: Philip Orr
QA Contact: Testopia
URL:
Keywords: Academy
Depends on:
Blocks:
 
Reported: 2021-01-21 17:54 UTC by Christofer Zorn
Modified: 2023-12-28 20:43 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
23.05.00,22.11.05,22.05.13,21.11.21


Attachments
Bug 27513: Add notes to variables for report parameters template (1.59 KB, patch)
2023-03-31 07:25 UTC, Philip Orr
Details | Diff | Splinter Review
Bug 27513: Add notes to variables for report parameters template (1.64 KB, patch)
2023-04-01 21:00 UTC, David Nind
Details | Diff | Splinter Review
Bug 27513: Add notes to variables for report parameters template (1.69 KB, patch)
2023-04-04 22:50 UTC, Lucas Gass
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Christofer Zorn 2021-01-21 17:54:45 UTC
Hello!

Is it possible to add the report Notes field (which appears on the Edit and results page) to the parameters page?

As an Admin, I can see the details of the notes and remember what the report does and why, but for the normal user, there might be beneficial notes or reminders that can be put there (i.e. This report runs for the last month, or last two years).

Not a huge change, but could be helpful.

Thanks

Christofer
Comment 1 Katrin Fischer 2023-01-23 23:44:22 UTC
+1 

You might also make notes on how to use the form fields in the notes and it would be helpful to see those earlier.
Comment 2 Philip Orr 2023-03-31 07:11:24 UTC
Looks like the template file for the Report parameters page actually already had TT code to display the notes field, it just wasn't getting the TT variable 'notes' from guided_reports.pl.
Comment 3 Philip Orr 2023-03-31 07:25:02 UTC
Created attachment 149012 [details] [review]
Bug 27513: Add notes to variables for report parameters template

This patch adds the TT variable 'notes' to the variables
that guided_reports.pl passes to the template guided_reports_start.tt
during SQL parameters entry in the phase 'Run this report'.

To test:
1. apply the patch
2. navigate to Reports -> Guided Reports -> Create from SQL
3. create an SQL report that includes at least one parameter, e.g.:
   SELECT barcode FROM items WHERE homebranch=<<Select library|branches>>
   the actual SQL and name of the report doesn't matter much, just make
   sure that you also put a note e.g. "Test text for display" in the
   field "Notes:" before you save the report.
4. run the report
5. the note you entered should now be displayed below the heading
   "Enter parameters for report..."
Comment 4 David Nind 2023-04-01 21:00:36 UTC
Created attachment 149068 [details] [review]
Bug 27513: Add notes to variables for report parameters template

This patch adds the TT variable 'notes' to the variables
that guided_reports.pl passes to the template guided_reports_start.tt
during SQL parameters entry in the phase 'Run this report'.

To test:
1. apply the patch
2. navigate to Reports -> Guided Reports -> Create from SQL
3. create an SQL report that includes at least one parameter, e.g.:
   SELECT barcode FROM items WHERE homebranch=<<Select library|branches>>
   the actual SQL and name of the report doesn't matter much, just make
   sure that you also put a note e.g. "Test text for display" in the
   field "Notes:" before you save the report.
4. run the report
5. the note you entered should now be displayed below the heading
   "Enter parameters for report..."

Signed-off-by: David Nind <david@davidnind.com>
Comment 5 David Nind 2023-04-01 21:04:27 UTC
Testing notes (using KTD):

1. Not related to this bug, but on the reports results page, the text for 'Notes:' and 'Total number of results:' aren't aligned with the labels (the text is slightly higher than the labels). Not sure whether there is already a bug for this or not.
Comment 6 Lucas Gass 2023-04-04 22:49:54 UTC
Simple fix that works as described, no issues from the QA scripts. 

Like David mentions, the display is a bit weird. The notes are also lacking a label, "Notes: ", when entering parameters. I think we can address that all in another bug. This gets the notes on the page so we should move it along!
Comment 7 Lucas Gass 2023-04-04 22:50:24 UTC
Created attachment 149149 [details] [review]
Bug 27513: Add notes to variables for report parameters template

This patch adds the TT variable 'notes' to the variables
that guided_reports.pl passes to the template guided_reports_start.tt
during SQL parameters entry in the phase 'Run this report'.

To test:
1. apply the patch
2. navigate to Reports -> Guided Reports -> Create from SQL
3. create an SQL report that includes at least one parameter, e.g.:
   SELECT barcode FROM items WHERE homebranch=<<Select library|branches>>
   the actual SQL and name of the report doesn't matter much, just make
   sure that you also put a note e.g. "Test text for display" in the
   field "Notes:" before you save the report.
4. run the report
5. the note you entered should now be displayed below the heading
   "Enter parameters for report..."

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Comment 8 Tomás Cohen Arazi 2023-04-06 12:52:16 UTC
Pushed to master for 23.05.

Nice work everyone, thanks!
Comment 9 Jacob O'Mara 2023-04-16 20:36:55 UTC
Nice work, thanks everyone!

Pushed to 22.11.x for the next release.
Comment 10 Lucas Gass 2023-05-05 21:36:43 UTC
Backported to 22.05.x for upcoming 22.05.13.
Comment 11 Arthur Suzuki 2023-05-23 09:09:03 UTC
Minor, won't backport.
Comment 12 Arthur Suzuki 2023-05-23 09:24:43 UTC
actually minors should also be backported for oldstable : try and backport regardless of severity.
Applied to 21.11 for 21.11.21