Kyle M Hall
ad1d8fd561
A plugin hook for GetPreparedLetter would be very useful. It could be used to add universal headers and/or footers to messages, attach news, and modify notices in other ways in whole or in part. It could even be used for call webhooks when certain types of notices are sent. For example, the MessageBee ( https://uniquelibrary.com/messagebee/ ) plugin for Koha generates YAML based notice content, which is then further processed by the before_send_messages hook. This process is unreliable due to the possible changes in data between the creation of the yaml and the reading of that yaml and transforming it into JSON with much more data. For example, the yaml may contain an issue_id, but that checkout may have been returned in the meantime. A hook like this would allow the MessageBee plugin to skip the yaml step and create the json data directly which is then sent to MessageBee for transmission to the patron. Test Plan: 1) Apply this patch 2) prove t/db_dependent/Koha/Plugins/Transform_prepared_letter_hook.t 3) Download and install the Kitchen Sink plugin v2.4.0 https://github.com/bywatersolutions/dev-koha-plugin-kitchen-sink/releases/tag/v2.4.0 4) Generate any notice or slip, such as a checkin or checkout notice 5) Note that all notices now end with "Thanks for using your local library!" Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> |
||
---|---|---|
.. | ||
bad_plugins/Koha/Plugin | ||
IdP | ||
Koha/BackgroundJob | ||
Mocks | ||
plugins/Koha/Plugin | ||
QA | ||
Bootstrap.pm | ||
Dates.pm | ||
Mocks.pm | ||
Selenium.pm | ||
TestBuilder.pm |