Bug 37989: Add template toolkit to problem_report notice

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 <olivier.vezina@inLibro.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
Lisette Scheer 2024-09-23 18:12:31 +00:00 committed by Katrin Fischer
parent 75f3abd342
commit a524d94abb
Signed by: kfischer
GPG key ID: 0EF6E2C03357A834

View file

@ -1973,6 +1973,12 @@ sub _get_tt_params {
plural => 'train_items', plural => 'train_items',
pk => 'train_item_id' pk => 'train_item_id'
}, },
problem_reports => {
module => 'Koha::ProblemReports',
singluar => 'problemreport',
plural => 'problemreports',
pk => 'reportid'
},
}; };
my $dbh = C4::Context->dbh; my $dbh = C4::Context->dbh;