Summary: | Broken characters in patron_emailer.pl verbose mode | ||
---|---|---|---|
Product: | Koha | Reporter: | Tomás Cohen Arazi (tcohen) <tomascohen> |
Component: | Command-line Utilities | Assignee: | Tomás Cohen Arazi (tcohen) <tomascohen> |
Status: | CLOSED FIXED | QA Contact: | Kyle M Hall (khall) <kyle> |
Severity: | normal | ||
Priority: | P5 - low | CC: | david, kyle, lucas, robin, victor |
Version: | unspecified | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Trivial patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: |
This fixes the patron_emailer.pl script (misc/cronjobs/patron_emailer.pl) so that non-ASCII characters in notices display correctly.
|
Version(s) released in: |
22.11.00,22.05.06,21.11.12
|
Circulation function: | |||
Attachments: |
Screenshot
Bug 31282: Fix broken characters in patron_emailer.pl verbose mode Bug 31282: Fix broken characters in patron_emailer.pl verbose mode Bug 31282: Fix broken characters in patron_emailer.pl verbose mode |
Description
Tomás Cohen Arazi (tcohen)
2022-08-02 12:22:07 UTC
Created attachment 138502 [details]
Screenshot
Created attachment 138504 [details] [review] Bug 31282: Fix broken characters in patron_emailer.pl verbose mode To test: 1. Have a report containing: SELECT tomascohen@theke.io; 2. Have a members notice containing ¡ and other non-ASCII characters. 3. Run (changing the report number and notice code accordingly): $ kshell k$ perl misc/cronjobs/patron_emailer.pl --report 4 \ --notice BIRTHDAY --from tomascohen@theke.io --module members => FAIL: non-ASCII characters are broken 4. Apply this patch 5. Repeat 3 => SUCCESS: Things print correctly! 6. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Created attachment 139439 [details] [review] Bug 31282: Fix broken characters in patron_emailer.pl verbose mode To test: 1. Have a report containing: SELECT tomascohen@theke.io; 2. Have a members notice containing ¡ and other non-ASCII characters. 3. Run (changing the report number and notice code accordingly): $ kshell k$ perl misc/cronjobs/patron_emailer.pl --report 4 \ --notice BIRTHDAY --from tomascohen@theke.io --module members => FAIL: non-ASCII characters are broken 4. Apply this patch 5. Repeat 3 => SUCCESS: Things print correctly! 6. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.com> Testing notes (using koha-testing-docker): - I couldn't get step 1 to work for me, so I ended up: . Creating a new report: SELECT borrowernumber, firstname, surname, address, email, address2, city, zipcode, dateofbirth FROM borrowers WHERE MONTH(dateofbirth) = 08 . Edited details of patrons in the results so that they have an email address. . Created a notice with a code called BIRTHDAY and added some text to the Email notice with non-ASCII characters. ==> step 3 worked as expected Created attachment 139486 [details] [review] Bug 31282: Fix broken characters in patron_emailer.pl verbose mode To test: 1. Have a report containing: SELECT tomascohen@theke.io; 2. Have a members notice containing ¡ and other non-ASCII characters. 3. Run (changing the report number and notice code accordingly): $ kshell k$ perl misc/cronjobs/patron_emailer.pl --report 4 \ --notice BIRTHDAY --from tomascohen@theke.io --module members => FAIL: non-ASCII characters are broken 4. Apply this patch 5. Repeat 3 => SUCCESS: Things print correctly! 6. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Pushed to master for 22.11. Nice work everyone, thanks! Backported to 22.05.x for 22.05.06 release Not backported to oldoldstable (21.05.x). Feel free to ask if it's needed. Nothing to document it seems, marking resolved. Thanks! Pushed to 21.11 for 21.11.12 |