Koha/t/lib
Kyle M Hall ad1d8fd561
Bug 35568: Add a transform_prepared_letter plugin hook to allow modification of notices created via GetPreparedLetter
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>
2024-04-22 08:57:38 +02:00
..
bad_plugins/Koha/Plugin
IdP
Koha/BackgroundJob
Mocks Bug 36084: Fix cookie domain for www/ tests 2024-03-04 14:33:24 +01:00
plugins/Koha/Plugin Bug 35568: Add a transform_prepared_letter plugin hook to allow modification of notices created via GetPreparedLetter 2024-04-22 08:57:38 +02:00
QA
Bootstrap.pm
Dates.pm
Mocks.pm
Selenium.pm Bug 35329: Add POD + tidy Selenium.pm 2024-03-01 11:01:22 +01:00
TestBuilder.pm Bug 36593: Add 'time' column type support to TestBuilder 2024-04-16 17:59:42 +02:00