https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38621
--- Comment #3 from David Nind <[email protected]> --- Created attachment 200036 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=200036&action=edit Bug 38621: Use GetPreparedLetter for report templates Previously, report templates were rendered using process_tt directly. This made the available variables inconsistent with other notices and slips. This patch switches to rendering report templates through the same function as other notices. To match the arguments to this system, this patch also makes the report system reference templates by their code rather than ID. Test plan: 1. Under Tools > Notices and Slips, create a new notice in the Reports module. Choose a code and a name, and under Email assign a subject and the following body: [% today %] [% FOREACH d IN data %] [% d.title %] [% END %] 2. Under Reports, create a new report from SQL with a name and the following query: SELECT * FROM biblio LIMIT 1 3. Create another report from SQL with a different name and the following query, specifying a runtime parameter: SELECT * FROM biblio WHERE 'a'=<<Param>> LIMIT 1 4. On the first report, select "Run with template" and choose the template created earlier. 5. Verify that the report runs successfully, and the output does not include the current date. 6. On the second report, select "Run with template" and choose the template created earlier. Choose "a" as the runtime parameter value when asked. 7. Verify that the report runs successfully, and the output does not include the current date. 8. Apply patch. 9. On the first report, select "Run with template" and choose the template created earlier. 10. Verify that the report runs successfully, and the output now includes the current date along with the fetched data. 11. Under the Download dropdown, select "Rendered template (...)". 12. Verify the downloaded file matches the report output. 13. On the second report, select "Run with template" and choose the template created earlier. Choose "a" as the runtime parameter value when asked. 14. Verify that the report runs successfully, and the output now includes the current date along with the fetched data. 15. Under the Download dropdown, select "Rendered template (...)". 16. Verify the downloaded file matches the report output. Sponsored-by: Open Fifth Signed-off-by: David Nind <[email protected]> -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
