From 4219d1660b1aa5c899eef34c99d9f21ee36fdfc3 Mon Sep 17 00:00:00 2001 From: Katrin Fischer Date: Sun, 16 Apr 2023 12:19:40 +0000 Subject: [PATCH] Bug 32917: Fix sample notice for CHANGE_PASSWORD We've identified 3 issues: * Name of patron is not showing up in subject line * Name of patron is now showing in notice text * Notice is set to be HTML, but has no line breaks and uses no HTML tags In the database update, these issues don't occur: $dbh->do( q{ INSERT IGNORE INTO letter (module, code, name, title, content, message_transport_type) VALUES ('members', 'PASSWORD_CHANGE', 'Notification of password change', 'Library account password change notification', "Dear [% borrower.firstname %] [% borrower.surname %],\r\n\r\nWe want to notify you that your password has been changed. If you did not change it yourself (or requested that change), please contact library staff.\r\n\r\nYour library.", 'email'); }); So this patch will make them match up: * Remove HTML flag * Update patron. to borrower. in message text * Remove patron name from subject (it won't work even with the correct variables) To test: * Add an email address to your favourite sample user * Make sure NotifyPasswordChange is set to "Notify" * Update the sample user's password using the "change password" feature * Verify a notice is shown in the notices tabs Note: you won't see the line break issue there because of bug 30287 * Apply patch * Recreate your database/run web installer so sample notices are loaded * Repeat the test, it should generate a nice lookig notice now --- installer/data/mysql/en/mandatory/sample_notices.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/installer/data/mysql/en/mandatory/sample_notices.yml b/installer/data/mysql/en/mandatory/sample_notices.yml index e73f6b8167..fd4ed6768f 100644 --- a/installer/data/mysql/en/mandatory/sample_notices.yml +++ b/installer/data/mysql/en/mandatory/sample_notices.yml @@ -1321,12 +1321,12 @@ tables: code: PASSWORD_CHANGE branchcode: "" name: "Notification of password change" - is_html: 1 - title: "Library account password change notification for [% patron.firstname %] [% patron.surname %]" + is_html: 0 + title: "Library account password change notification" message_transport_type: email lang: default content: - - "Dear [% patron.firstname %] [% patron.surname %]," + - "Dear [% borrower.firstname %] [% borrower.surname %]," - "" - "We want to notify you that your password has been changed. If you did not change it yourself (or requested that change), please contact library staff." - "" -- 2.30.2