[Bug 34136] New: Add ability to render a report using a notice template
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34136 Bug ID: 34136 Summary: Add ability to render a report using a notice template Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Reports Assignee: koha-bugs@lists.koha-community.org Reporter: kyle@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org Sometimes it is useful to display the results of a report in a non-table format. We should be able to create notice templates to render reports. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34136 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |kyle@bywatersolutions.com |ity.org | -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34136 --- Comment #1 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 152769 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=152769&action=edit Bug 34136: Add ability to render a report using a notice template Sometimes it is useful to display the results of a report in a non-table format. We should be able to create notice templates to render reports. Test Plan: 1) Apply this patch 2) Restart all the things! 3) Create a new notice template using the new "Report" option from the "New notice" pulldown. 4) In the "Print" area, paste the following template: [% FOREACH b IN data %] <div class="panel panel-default"> <div class="panel-heading">[% b.surname %], [% b.firstname %]</div> <div class="panel-body">Expiration: [% b.dateexpiry %]</div> <div class="panel-footer">ID: [% b.borrowernumber %]</div> </div> [% END %] 5) Create a report with the query: SELECT * FROM borrowers 6) Once the report is saved, use the new "Run with template" option to select the template you just created. 7) Note that instead of the results being a paged table, you instead see the results rendered as cards! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34136 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34136 Sam Lau <samalau@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA CC| |samalau@gmail.com --- Comment #2 from Sam Lau <samalau@gmail.com> --- After I created the new notice template using the report option when I try to go to Reports and then select 'create from SQL', the page did not load and I'm left with this error: Could not compile /kohadevbox/koha/reports/guided_reports.pl: Can't locate Koha/TemplateUtils.pm in @INC (you may need to install the Koha::TemplateUtils module) (@INC contains: /kohadevbox/koha /kohadevbox/koha/lib /kohadevbox/koha/installer /kohadevbox/koha/lib/installer /etc/perl /usr/local/lib/aarch64-linux-gnu/perl/5.32.1 /usr/local/share/perl/5.32.1 /usr/lib/aarch64-linux-gnu/perl5/5.32 /usr/share/perl5 /usr/lib/aarch64-linux-gnu/perl-base /usr/lib/aarch64-linux-gnu/perl/5.32 /usr/share/perl/5.32 /usr/local/lib/site_perl /var/lib/koha/kohadev/plugins) at /kohadevbox/koha/reports/guided_reports.pl line 41. BEGIN failed--compilation aborted at /kohadevbox/koha/reports/guided_reports.pl line 41. at /usr/share/perl5/CGI/Compile.pm line 144 It is also important to note that before creating a new notice template, the report page loads perfectly fine. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34136 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |33030 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33030 [Bug 33030] Add standardized subroutine for processing Template Toolkit syntax outside of notices -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34136 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34136 --- Comment #3 from Kyle M Hall <kyle@bywatersolutions.com> --- (In reply to Sam Lau from comment #2)
After I created the new notice template using the report option when I try to go to Reports and then select 'create from SQL', the page did not load and I'm left with this error:
My bad! I forgot to add the dependent bug on bugzilla. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34136 Sam Lau <samalau@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34136 Sam Lau <samalau@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #152769|0 |1 is obsolete| | --- Comment #4 from Sam Lau <samalau@gmail.com> --- Created attachment 153100 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=153100&action=edit Bug 34136: Add ability to render a report using a notice template Sometimes it is useful to display the results of a report in a non-table format. We should be able to create notice templates to render reports. Test Plan: 1) Apply this patch 2) Restart all the things! 3) Create a new notice template using the new "Report" option from the "New notice" pulldown. 4) In the "Print" area, paste the following template: [% FOREACH b IN data %] <div class="panel panel-default"> <div class="panel-heading">[% b.surname %], [% b.firstname %]</div> <div class="panel-body">Expiration: [% b.dateexpiry %]</div> <div class="panel-footer">ID: [% b.borrowernumber %]</div> </div> [% END %] 5) Create a report with the query: SELECT * FROM borrowers 6) Once the report is saved, use the new "Run with template" option to select the template you just created. 7) Note that instead of the results being a paged table, you instead see the results rendered as cards! Signed-off-by: Sam Lau <samalau@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34136 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #153100|0 |1 is obsolete| | --- Comment #5 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 154153 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=154153&action=edit Bug 34136: Add ability to render a report using a notice template Sometimes it is useful to display the results of a report in a non-table format. We should be able to create notice templates to render reports. Test Plan: 1) Apply this patch 2) Restart all the things! 3) Create a new notice template using the new "Report" option from the "New notice" pulldown. 4) In the "Print" area, paste the following template: [% FOREACH b IN data %] <div class="panel panel-default"> <div class="panel-heading">[% b.surname %], [% b.firstname %]</div> <div class="panel-body">Expiration: [% b.dateexpiry %]</div> <div class="panel-footer">ID: [% b.borrowernumber %]</div> </div> [% END %] 5) Create a report with the query: SELECT * FROM borrowers 6) Once the report is saved, use the new "Run with template" option to select the template you just created. 7) Note that instead of the results being a paged table, you instead see the results rendered as cards! Signed-off-by: Sam Lau <samalau@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34136 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |34456 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34456 [Bug 34456] Add the ability to download a template rendered report as a file -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34136 Sally <sally.healey@cheshiresharedservices.gov.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |sally.healey@cheshireshared | |services.gov.uk -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34136 --- Comment #6 from Sally <sally.healey@cheshiresharedservices.gov.uk> --- This is a brilliant development - can't wait to see this in Koha. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34136 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #154153|0 |1 is obsolete| | --- Comment #7 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 154227 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=154227&action=edit Bug 34136: Add ability to render a report using a notice template Sometimes it is useful to display the results of a report in a non-table format. We should be able to create notice templates to render reports. Test Plan: 1) Apply this patch 2) Restart all the things! 3) Create a new notice template using the new "Report" option from the "New notice" pulldown. 4) In the "Print" area, paste the following template: [% FOREACH b IN data %] <div class="panel panel-default"> <div class="panel-heading">[% b.surname %], [% b.firstname %]</div> <div class="panel-body">Expiration: [% b.dateexpiry %]</div> <div class="panel-footer">ID: [% b.borrowernumber %]</div> </div> [% END %] 5) Create a report with the query: SELECT * FROM borrowers 6) Once the report is saved, use the new "Run with template" option to select the template you just created. 7) Note that instead of the results being a paged table, you instead see the results rendered as cards! Signed-off-by: Sam Lau <samalau@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34136 Andrew Fuerste-Henry <andrewfh@dubcolib.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |andrewfh@dubcolib.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34136 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |katrin.fischer@bsz-bw.de |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34136 --- Comment #8 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I absolutely love the idea of this. But I worry a little about usability: * The templates are likely to work only with specific reports. The list of templates could grow really long. This will create a situation where you have a long list of templates you could apply and a need to 'guess' which would work or belongs to the report. I wonder if we should not create some link between template and report that works/goes with it. * We absolutely need documentation for this: Needs to be added to print, uses a 'data' object with the db columns etc. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34136 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34136 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #154227|0 |1 is obsolete| | --- Comment #9 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 157694 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=157694&action=edit Bug 34136: Add ability to render a report using a notice template Sometimes it is useful to display the results of a report in a non-table format. We should be able to create notice templates to render reports. Test Plan: 1) Apply this patch 2) Restart all the things! 3) Create a new notice template using the new "Report" option from the "New notice" pulldown. 4) In the "Print" area, paste the following template: [% FOREACH b IN data %] <div class="panel panel-default"> <div class="panel-heading">[% b.surname %], [% b.firstname %]</div> <div class="panel-body">Expiration: [% b.dateexpiry %]</div> <div class="panel-footer">ID: [% b.borrowernumber %]</div> </div> [% END %] 5) Create a report with the query: SELECT * FROM borrowers 6) Once the report is saved, use the new "Run with template" option to select the template you just created. 7) Note that instead of the results being a paged table, you instead see the results rendered as cards! Signed-off-by: Sam Lau <samalau@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34136 --- Comment #10 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 157695 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=157695&action=edit Bug 34136: (QA follow-up) Change Report to Reports as category in notices and slips Looking at the other entries for the module in notices we most often use the actual module name: patrons, suggestions, holds, etc. So I updated "Report" to "Reports" to match that pattern. Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34136 --- Comment #11 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 157696 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=157696&action=edit Bug 34136: (QA follow-up) Perltidy Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34136 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |23.11.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34136 --- Comment #12 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Pushed to master for 23.11. Nice work everyone, thanks! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34136 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |Needs documenting CC| |fridolin.somers@biblibre.co | |m --- Comment #13 from Fridolin Somers <fridolin.somers@biblibre.com> --- Depends on Bug 33030 not in 23.05.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34136 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@ptfs-europe | |.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34136 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=27510 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34136 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the| |With this feature you can release notes| |use a notice template for | |rendering the results of a | |report in the reports | |module. As you can use | |Template Toolkit and HTML | |in notices, this gives you | |a lot of flexibility to | |create for example a nice | |print format for your data. | | | |Once a notice has been | |created with the module | |'Reports' selected, you | |will have the option to run | |your report using the | |template. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34136 Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Documentation| |https://gitlab.com/koha-com submission| |munity/koha-manual/-/merge_ | |requests/803 CC| |caroline.cyr-la-rose@inlibr | |o.com Status|Needs documenting |RESOLVED Documentation| |Caroline Cyr La Rose contact| | Resolution|--- |FIXED --- Comment #14 from Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> --- This is a very interesting feature! Thank you all. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34136 --- Comment #15 from Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> --- (In reply to Katrin Fischer from comment #8)
* We absolutely need documentation for this: Needs to be added to print, uses a 'data' object with the db columns etc.
For the manual, I only reproduced the example that was here as I don't know a lot of TT except the very basic basics. We should definitely have a wiki page about this... -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34136 --- Comment #16 from Kyle M Hall <kyle@bywatersolutions.com> --- (In reply to Caroline Cyr La Rose from comment #15)
(In reply to Katrin Fischer from comment #8)
* We absolutely need documentation for this: Needs to be added to print, uses a 'data' object with the db columns etc.
For the manual, I only reproduced the example that was here as I don't know a lot of TT except the very basic basics. We should definitely have a wiki page about this...
Agreed. A library of report/template combos would be very useful. The only times I've used this feature so far are so specific as to be useless to other libraries. I do wonder if we should have an optional template section on the existing reports library wiki page, or if we should start a separate page. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34136 Pedro Amorim <pedro.amorim@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |36158 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36158 [Bug 36158] Text on the "Show SQL code" button at guided_reports.pl breaks if report notice templates exist -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34136 Pedro Amorim <pedro.amorim@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |36157 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36157 [Bug 36157] Links in the "Run with template" dropdown at guided_reports.pl have odd formatting -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34136 Pedro Amorim <pedro.amorim@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks|36157 | Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36157 [Bug 36157] Links in the "Run with template" dropdown at guided_reports.pl have odd formatting -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34136 Andrew Fuerste-Henry <andrewfh@dubcolib.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |36513 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36513 [Bug 36513] Default report output to template -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34136 Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |38621 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38621 [Bug 38621] [% today %] variable unavailable in report templates -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34136 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |37848 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37848 [Bug 37848] "Run with template" options need formatting -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org