From 50812e21089b267b6fed3582166a2f8fcf2db0cd Mon Sep 17 00:00:00 2001 From: Lisette Scheer Date: Mon, 23 Sep 2024 18:12:31 +0000 Subject: [PATCH] Bug 37989: Add template toolkit to problem_report notice Content-Type: text/plain; charset=utf-8 This patch adds the ability to use template toolkit in the PROBLEM_REPORT notice Test plan: 1. Turn on OPACReportProblem in the system preferences. 2. In the staff interface, create the following report: SELECT * FROM message_queue WHERE letter_id='PROBLEM_REPORT' 3. Log into the OPAC 4. Edit the PROBLEM_REPORT notice to include [% problemreport.username %] after the bespoke syntax for the username. 5. Report a problem 6. Run the report you created. 7. Observe the data. (Bug 37991, the title doesn't store properly) 8. Apply the patch 9. Restart all services (restart_all on command line Restart Services in sandbox options) 10. File a new OPAC problem report 11. Run your report. 2 usernames should now show. Signed-off-by: Olivier V Signed-off-by: Marcel de Rooy --- C4/Letters.pm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/C4/Letters.pm b/C4/Letters.pm index 0e17d4c23d..7ddb89b5c0 100644 --- a/C4/Letters.pm +++ b/C4/Letters.pm @@ -1973,6 +1973,12 @@ sub _get_tt_params { plural => 'train_items', pk => 'train_item_id' }, + problem_reports => { + module => 'Koha::ProblemReports', + singluar => 'problemreport', + plural => 'problemreports', + pk => 'reportid' + }, }; my $dbh = C4::Context->dbh; -- 2.39.5