Bug 32917: Fix sample notice for CHANGE_PASSWORD
authorKatrin Fischer <katrin.fischer.83@web.de>
Sun, 16 Apr 2023 12:19:40 +0000 (12:19 +0000)
committerTomas Cohen Arazi <tomascohen@theke.io>
Tue, 9 May 2023 14:46:59 +0000 (11:46 -0300)
commit28738472465a9a78b556e5f462ce8ee39dab1c35
tree947b67cd6d45c0d28ff8bd7afffea133e513fc50
parent2496f6373ab7c3be31480e29050b11c0cdb7a964
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

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
installer/data/mysql/en/mandatory/sample_notices.yml