[Koha-bugs] [Bug 30076] Add ability to check patron messaging preferences from a notice

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Feb 10 18:23:14 CET 2022


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30076

--- Comment #1 from Kyle M Hall <kyle at bywatersolutions.com> ---
Created attachment 130458
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=130458&action=edit
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: [% patron.has_messaging_preference({ message_name => 'Item_Checkout',
message_transport_type => 'email' }) %]
   <br/>
   TEST2: [% patron.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

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list