Koha/t/db_dependent/Patron
Kyle Hall f507b685be Bug 30076: Add ability to check patron messaging preferences from a notice
Some libraries want to be able to use a patron's messaging preferences to conditionally change the contents of a notice depending on the patron's other messaging preference. For example, a library has requested to have the note on the hold slip if the patron has requested phone messages for waiting holds. This really only entails adding a method to the Koha::Patron class to allow this type of looking.

Test plan:
1) Apply this patch
2) Enable item checkout notices for a patron for email, but not sms
3) Include the following in the notice:
   TEST1: [% borrower.has_messaging_preference({ message_name => 'Item_Checkout', message_transport_type => 'email' }) %]
   <br/>
   TEST2: [% borrower.has_messaging_preference({ message_name => 'Item_Checkout', message_transport_type => 'sms' }) %]
4) Generate a checkout and notice for that patron
5) Note the generated notice has a 1 for TEST1, but not for TEST2

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-08 15:49:16 +02:00
..
Borrower_Debarments.t Bug 29395: use EXPORT_OK from Koha::Patron::Debarments 2021-11-03 15:40:52 +01:00
Borrower_Discharge.t
Borrower_Files.t
Borrower_PrevCheckout.t Bug 28931: Use EXPORT_OK from Koha::DateUtils 2021-10-07 11:01:05 +02:00
Housebound.t
HouseboundProfiles.t Bug 29847: Make Koha::Patron::HouseboundProfile->housebound_visits return a resultset 2022-02-09 15:36:23 -10:00
HouseboundRoles.t Bug 29844: Some more uncaught cases 2022-02-09 15:36:23 -10:00
HouseboundVisits.t Bug 29844: Some more uncaught cases 2022-02-09 15:36:23 -10:00
Messages.t Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Messaging.t Bug 30076: Add ability to check patron messaging preferences from a notice 2022-04-08 15:49:16 +02:00
Relationships.t Bug 29844: Some more uncaught cases 2022-02-09 15:36:23 -10:00