Nick Clemens
f719371662
This patch adds a script for sending holds reminder notice to patrons. We add a 'send_notice' routine to Koha::Patrons - this will either send using the patron's email prefs, or allow forcing of a single method via the cron To test: 1 - Create an email hold reminder notice for a single library (Koha module: Holds, code HOLDREMINDER, branch: CPL) 2 - Set some waiting holds today for patrons at CPL, ensure those patrons have 'email' as the transport for hold filled notices 3 - perl misc/cronjobs/holds_reminder.pl -v -lettercode HOLDREMINDER -n -li CPL 4 - You should see the patrons here would have received emails 5 - perl misc/cronjobs/holds_reminder.pl -v -lettercode HOLDREMINDER -li CPL 6 - You should see the emails that were sent 7 - Check the patron notices tab to confirm 8 - Note a ptron with two holds waiting receives only one notice 9 - perl misc/cronjobs/holds_reminder.pl -v -lettercode HOLDREMINDER -li CPL -days 3 10 - No notices are sent 11 - Adjust the waiting date for the holds: UPDATE reserves SET waitingdate=DATE_SUB(CURDATE(), INTERVAL 3 DAY) WHERE waitingdate = CURDATE(); 12 - perl misc/cronjobs/holds_reminder.pl -v -lettercode HOLDREMINDER -li CPL -days 3 13 - Confirm the holds are now reminded 14 - Set yesterday as a holiday for CPL 15 - perl misc/cronjobs/holds_reminder.pl -v -lettercode HOLDREMINDER -n -li CPL -holidays -days 3 16 - Notices should not be sent 17 - perl misc/cronjobs/holds_reminder.pl -v -lettercode HOLDREMINDER -n -li CPL -holidays -days 2 18 - Notices should be sent again 19 - perl misc/cronjobs/holds_reminder.pl -v -lettercode HOLDREMINDER -n -holidays -days 2 20 - Should get feedback that notice was not found for other libraries 21 - perl misc/cronjobs/holds_reminder.pl -v -lettercode HOLDREMINDER -n -holidays -days 2 -mtt sms 22 - Notice is not found 23 - Add the notice for sms 24 - perl misc/cronjobs/holds_reminder.pl -v -lettercode HOLDREMINDER -n -holidays -days 2 -mtt sms 25 - The notice should be sent 26 - Check patrons messaging tab to confirm 27 - prove -v t/db_dependent/Koha/Patrons.t Sponsored by: The Hotchkiss School (http://www.hotchkiss.org/) Signed-off-by: Kim Gnerre <kgnerre@hotchkiss.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> |
||
---|---|---|
.. | ||
Acquisition | ||
Biblio | ||
Budgets | ||
Circulation | ||
db_dependent | ||
edi_testfiles | ||
etc | ||
External | ||
Koha | ||
lib | ||
Members | ||
Number | ||
Search | ||
Serials | ||
SIP | ||
Test | ||
00-checkdatabase-version.t | ||
00-deprecated.t | ||
00-load.t | ||
00-merge-conflict-markers.t | ||
00-testcritic.t | ||
00-valid-xml.t | ||
Auth.t | ||
Auth_with_shibboleth.t | ||
AuthoritiesMarc_MARC21.t | ||
AuthoritiesMarc_UNIMARC.t | ||
Barcodes_annual.t | ||
Barcodes_EAN13.t | ||
Barcodes_hbyymmincr.t | ||
Barcodes_incremental.t | ||
Biblio.t | ||
Biblio2.t | ||
Budgets.t | ||
Calendar.t | ||
Charset.t | ||
Circulation_barcodedecode.t | ||
ClassSortRoutine.t | ||
ClassSortRoutine_Dewey.t | ||
ClassSortRoutine_Generic.t | ||
ClassSortRoutine_LCC.t | ||
ClassSource.t | ||
Context.t | ||
Contract.t | ||
Creators.t | ||
DateUtils.t | ||
Debug.t | ||
dummy.t | ||
Edifact.t | ||
EdiInvoice.t | ||
Ediorder.t | ||
Ediordrsp.t | ||
EdiTransport.t | ||
Form_MessagingPreferences.t | ||
HtmlTags.t | ||
ImportBatch.t | ||
Installer_PerlModules.t | ||
Installer_pm.t | ||
ItemCirculationAlertPreference.t | ||
Koha.t | ||
Koha_MetadataRecord.t | ||
Koha_SearchEngine_Elasticsearch_Browse.t | ||
Koha_Template_Plugin_Cache.t | ||
Koha_Template_Plugin_HtmlId.t | ||
Koha_Template_Plugin_Koha.t | ||
Koha_Util_FrameworkPlugin.t | ||
Koha_Util_MARC.t | ||
Labels.t | ||
Labels_split_ccn.t | ||
Labels_split_ddcn.t | ||
Labels_split_lccn.t | ||
Labels_split_Regex.t | ||
Languages.t | ||
Letters.t | ||
Logger.t | ||
Makefile.t | ||
Matcher.t | ||
Members_Messaging.t | ||
OpenLibrarySearch.t | ||
Output.t | ||
Output_JSONStream.t | ||
Patron.t | ||
Patroncards.t | ||
Patroncards_Batch.t | ||
Patroncards_Lib.t | ||
Patroncards_Patroncard.t | ||
Patroncards_Profile.t | ||
Patroncards_Template.t | ||
Prices.t | ||
RecordProcessor.t | ||
Ris.t | ||
Scheduler.t | ||
Scrubber.t | ||
Search.t | ||
Search_PazPar2.t | ||
SimpleMARC.t | ||
SMS.t | ||
SocialData.t | ||
Stats.t | ||
SuggestionEngine.t | ||
SuggestionEngine_AuthorityFile.t | ||
template_filters.t | ||
timezones.t | ||
TmplToken.t | ||
Token.t | ||
XSLT.t |