Summary: | Add an item loop mechanism to patron_emailer.pl cron | ||
---|---|---|---|
Product: | Koha | Reporter: | Andrew Fuerste-Henry <andrew> |
Component: | Notices | Assignee: | Bugs List <koha-bugs> |
Status: | NEW --- | QA Contact: | Testopia <testopia> |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | bwsdonna, kelly, kyle, nick, r.delahunty |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: |
Description
Andrew Fuerste-Henry
2021-01-15 18:27:39 UTC
Afaik the patron emailer is a plugin (even if I'd like it to be a feature in Koha :) ). So we probably should close that here? I meant the cron: https://github.com/Koha-Community/Koha/blob/master/misc/cronjobs/patron_emailer.pl The cron is essentially just a commandline version of the plugin. If we teach the cron to do cool things, we should also hassle Nick into teaching the same things to the plugin :) Could we also hassle him to move the GUI for it into core? :) We can try! ¯\_(ツ)_/¯ https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27452 Looking at some of the examples on the Bywater Blog it seemed like listing items was possible with TT syntax (but it seems posts might no longer be available?) What should we do with this bug? WONTFIX? We are using the Koha patron emailer (introduced in 19.05) rather than the Bywater plugin for our leavers (chasing them before they leave for items on loan to be returned) and have been trying to use template toolkit inside the notice so it can send different wordings to different patron groups (like we have it doing for MEMBERSHIP_EXPIRY, for example), but the testing has failed. Had it worked, our plan was to try the [% FOREACH checkout IN checkouts %] loop from the AUTO_RENEWAL_DGST to improve the horrid word-wrapped list of items on loan, pulled from the report. Our support company said: "the patron emailer doesn't yet support HTML, and I highly doubt that it would support template toolkit either". Might the answer be to improve the patron emailer so it accepts TT (and also html)? (In reply to Ray Delahunty from comment #6) > word-wrapped list of items on loan, pulled from the report. Our support > company said: "the patron emailer doesn't yet support HTML, and I highly > doubt that it would support template toolkit either". Might the answer be to > improve the patron emailer so it accepts TT (and also html)? It seems strange that the cron should be so different from the in-built functionality? Apologies- on 22.11 I have notices being sent by the patron_emailer.pl script working perfectly with html, and the fields pulled in from the report must use TT notation so html and at least some TT is supported. All I can assume from earlier failures (ages back) must be down to specific objects/ variables that either aren’t fully supported (or more likely!) I had syntax errors in my TT code. While we wait for the patron emailer to have something like an <item></item> feature addded, so titles on a loan list (for example) will appear on separate lines, we are using a SEPARATOR with a GROUP CONCAT to improve the the horrid word-wrapped list in our leavers emails. We feed the list to a notice using the loans field: (SELECT GROUP_CONCAT( ExtractValue(metadata,'//datafield[@tag="245"]/subfield[@code>="a"]') SEPARATOR '<br/>') FROM [...] AS 'loans' Works OK. |