By abhisheknagar

Oh, I was sending Notifications to Patrons on Item Issue, but suddenly the management have instructed to send notifications on Item Return, Renewal etc as well or they have asked to send Notifications as SMS/WhatsApp in addition to Email, and now i realise that this will ge a pain to implement as i will need to implement this for each patron.

NO NO

This can be done automatically here is the solution

Step 1 ) Modify Messaging Preference for each  Patron Categories

For Each Patron Category set the Default Message Templates from the link  http://<your-library-staff-panel>/cgi-bin/koha/admin/categories.pl

 

Step 2) Use the following commands on the Koha Server Terminal

sudo su

export PERL5LIB="/usr/share/koha/lib"

export KOHA_CONF="/etc/koha/sites/library/koha-conf.xml"

cd /usr/share/koha/bin/maintenance

perl borrowers-force-messaging-defaults.pl --doit

 

You are Done !!!

The Script borrowers-force-messaging-defaults.pl  will force update messaging preference of all Patrons

Ensure that the koha-conf.xml PATH is correctly set in Step 2 in case your library name is other than library.


This will be useful if you have just implemented my New Module to send Notifications via WhatsApp Business API