[Bug 44344] New: An unknown <<token>> in a notice's subject is sent as it is, though it is removed from the body
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44344 Bug ID: 44344 Summary: An unknown <<token>> in a notice's subject is sent as it is, though it is removed from the body Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: minor Priority: P5 - low Component: Notices Assignee: koha-bugs@lists.koha-community.org Reporter: babarjunaid1122@gmail.com QA Contact: testopia@bugs.koha-community.org CC: martin.renvoize@openfifth.co.uk Target Milestone: --- GetPreparedLetter removes any <<...>> left after substitution from the notice content ("remove any stragglers") but not from the title, which becomes the email subject. A typo or an unsupported field in a subject, e.g. <<borrowers.no_such_column>>, reaches the patron literally. To reproduce (main 186bbe7), the new test in t/db_dependent/Letters.t: 1. A letter with title 'Notice<<borrowers.no_such_column>> about <<status>>' and content 'Body<<no.such>> <<status>>'. 2. GetPreparedLetter with status = overdue. 3. Content: 'Body overdue'. Title: 'Notice<<borrowers.no_such_column>> about overdue'. Expected: the title is cleaned the same way as the content: 'Notice about overdue'. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44344 --- Comment #1 from babar junaid <babarjunaid1122@gmail.com> --- Created attachment 212811 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=212811&action=edit Bug 44344: Remove unknown <<tokens>> from the notice title too Bug 44344: Remove unknown <<tokens>> from the notice title too GetPreparedLetter removed any <<...>> left after substitution from the content but not from the title, so a typo or an unsupported field in a notice subject was sent to the patron as it was. Test plan: 1. Apply only the test file change and run prove t/db_dependent/Letters.t The new test fails: the title is 'Notice<<borrowers.no_such_column>> about overdue'. 2. Apply the whole patch and run it again: it passes. 3. prove t/db_dependent/Letters/TemplateToolkit.t still passes. Sponsored-by: Koha Solutions -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44344 babar junaid <babarjunaid1122@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Assignee|koha-bugs@lists.koha-commun |babarjunaid1122@gmail.com |ity.org | -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org