https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43744

--- Comment #1 from Olivia Reynolds <[email protected]> ---
Created attachment 207393
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=207393&action=edit
Bug 43744: Make the invoking report accessible in templates

This patch adds support for fetching from the reports table to
GetPreparedLetter, and uses this new functionality to make the relevant
report available to the template as the "report" variable.

Test plan:
1.  Under Tools > Notices and Slips, create a notice in the Reports
    module. Choose a code and a name, and use "[% report.report_name %]"
    as the print *and* email body.
2.  Under Reports, create a new report from SQL with a name and the
    following query:

    SELECT 1 AS borrowernumber, '[email protected]' AS email;

4.  Run this report with the template created earlier, and verify there
    is no output.
5.  From the base of Koha, run the following command, replacing CODE
    with the notice code created earlier, and the ID with the report ID
    created earlier:

    misc/cronjobs/patron_emailer.pl -module report -from [email protected]
-notice CODE -report ID

6.  Verify that the email is generated successfully, and that there is
    no output from the template.
7.  Apply patch.
8.  Repeat steps 4-6, and verify both instances of template output
    now display the name of the report you're using to run it.

Sponsored-by: Open Fifth

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to