Currently the PROBLEM_REPORT notice does not properly call the problemreports object into the notice.
Created attachment 171884 [details] [review] Attachment to Bug 37989 - Add template toolkit to problem_report notice Bug 37989: Add template toolkit to problem_report notice This patch adds the ability to use template toolkit in the PROBLEM_REPORT notice
To test: 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. Report a problem 5. Run the report you created. 6. Observe the data. (Bug 37991, the title doesn't store properly) 7. Apply the patch 8. Restart all services (restart_all on command line Restart Services in sandbox options) 9. Edit the PROBLEM_REPORT notice to include [% problemreport.username %] after the bespoke syntax for the username. 10. File a new OPAC problem report 11. Run your report. 2 usernames should now show.
Created attachment 172019 [details] [review] Bug 37989: Add template toolkit to problem_report notice This patch adds the ability to use template toolkit in the PROBLEM_REPORT notice Signed-off-by: Olivier V <olivier.vezina@inLibro.com>
Without the patch I get this: *************************** 2. row *************************** message_id: 2 letter_id: 90 borrowernumber: 51 subject: OPAC problem report content: Username: koha Problem page: / Title: this is the subject Message: this is the body metadata: letter_code: PROBLEM_REPORT message_transport_type: email status: pending time_queued: 2024-11-23 22:57:57 updated_on: 2024-11-23 22:57:57 to_address: root@localhost cc_address: NULL from_address: NULL reply_address: NULL content_type: NULL failure_code: ---------------------------- Isn't it okay? What is the expected anomaly? And it's the same with the patch. Even though in main there is not the problem_reports object.
@Lisette When attaching patches there should not be the "Attachment to" prefix to attachment name. It should be just the commit summary (1st line of the commit message). That's why we have twice the patch attached. Because they don't have exactly the same name so the 1st version isn't marked as obsolete and hidden. git bz does that by default but I think it's possible to get away without it and still get the same result. Also it look like "This patch adds the ability to use template toolkit in the PROBLEM_REPORT notice" is not part of the commit summary so it should be spaced by an empty line in the commit message.
Ah, both the confusion and the patch name came from doing this on my laptop during KohaCon between presentations. The test plan should have step 9 before the first one is created so you can see that the tt doesn't populate. Edit the PROBLEM_REPORT notice to include [% problemreport.username %] after the bespoke syntax for the username. Then you can see after the patch applies that it does. There's a bug this one blocks to update the default to use TT.
Created attachment 175638 [details] [review] 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>
(In reply to Lisette Scheer from comment #6) > Ah, both the confusion and the patch name came from doing this on my laptop > during KohaCon between presentations. > > The test plan should have step 9 before the first one is created so you can > see that the tt doesn't populate. > > Edit the PROBLEM_REPORT notice to include [% problemreport.username %] after > the bespoke syntax for the username. > > Then you can see after the patch applies that it does. > > There's a bug this one blocks to update the default to use TT. Oops about that, it's a confusion from my side: It was about the commit summary (1st line of commit message) It's «Bug 37989: Add template toolkit to problem_report notice This patch adds the ability to use template toolkit in the PROBLEM_REPORT notice» And it looks like it should be just «Bug 37989: Add template toolkit to problem_report notice» And the rest of the commit message be « This patch adds the ability to use template toolkit in the PROBLEM_REPORT notice » About step 9 IIUC it should be above "Report a problem" With all that, tell me if the commit summary and the rest of the commit message is what you expect on the newly attached patch.