Bugzilla – Attachment 119328 Details for
Bug 15986
Add a script for sending hold waiting reminder notices
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 15986: Add sample notice and use as default
Bug-15986-Add-sample-notice-and-use-as-default.patch (text/plain), 4.44 KB, created by
Nick Clemens (kidclamp)
on 2021-04-08 14:56:24 UTC
(
hide
)
Description:
Bug 15986: Add sample notice and use as default
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2021-04-08 14:56:24 UTC
Size:
4.44 KB
patch
obsolete
>From a9b728f12ca4c27521d0ee12d55301ce716862d2 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Thu, 8 Apr 2021 14:43:10 +0000 >Subject: [PATCH] Bug 15986: Add sample notice and use as default > >--- > .../data/mysql/en/mandatory/sample_notices.yml | 11 ++++++++++ > misc/cronjobs/holds_reminder.pl | 25 ++++++++++------------ > 2 files changed, 22 insertions(+), 14 deletions(-) > >diff --git a/installer/data/mysql/en/mandatory/sample_notices.yml b/installer/data/mysql/en/mandatory/sample_notices.yml >index f61cd06100..bc21739ee2 100644 >--- a/installer/data/mysql/en/mandatory/sample_notices.yml >+++ b/installer/data/mysql/en/mandatory/sample_notices.yml >@@ -1233,6 +1233,17 @@ tables: > content: > - "A hold has been placed on the following item : <<biblio.title>> (<<biblio.biblionumber>>) by the user <<borrowers.firstname>> <<borrowers.surname>> (<<borrowers.cardnumber>>)." > >+ - module: reserves >+ code: HOLD_REMINDER >+ branchcode: "" >+ name: "Waiting hold reminder" >+ is_html: 0 >+ title: "You have waiting holds." >+ message_transport_type: email >+ lang: default >+ content: >+ - "Dear [% borrower.firstname %] [% borrower.surname %],\r\n\r\nThe follwing holds are waiting at [% branch.branchname %]:\r\n\\r\n[% FOREACH hold IN holds %]\r\n [% hold.biblio.title %] : waiting since [% hold.waitingdate %]\r\n[% END %]" >+ > - module: serial > code: SERIAL_ALERT > branchcode: "" >diff --git a/misc/cronjobs/holds_reminder.pl b/misc/cronjobs/holds_reminder.pl >index f938d0b108..5089af631e 100755 >--- a/misc/cronjobs/holds_reminder.pl >+++ b/misc/cronjobs/holds_reminder.pl >@@ -57,7 +57,7 @@ holds_reminder.pl > -v verbose > -n No email will be sent > -days <days> days waiting to deal with >- -lettercode <lettercode> predefined notice to use >+ -lettercode <lettercode> predefined notice to use, default is HOLD_REMINDER > -library <branchname> only deal with holds from this library (repeatable : several libraries can be given) > -holidays use the calendar to not count holidays as waiting days > -mtt <message_transport_type> type of messages to send, default is to use patrons messaging preferences for Hold filled >@@ -92,6 +92,10 @@ Optional parameter, number of days an items has been 'waiting' on hold > to send a message for. If not included a notice will be sent to all > patrons with waiting holds. > >+=item B<-lettercode> >+ >+Optional parameter, choose a notice to use. Default is 'HOLD_REMINDER'. >+ > =item B<-library> > > select notices for one specific library. Use the value in the >@@ -134,7 +138,7 @@ of the notices sent to patrons. > > C<holds_reminder.pl> - With no arguments the simple help is printed > >-C<holds_reminder.pl -lettercode CODE > In this most basic usage all >+C<holds_reminder.pl > In this most basic usage all > libraries are processed individually, and notices are prepared for > all patrons with waiting holds for whom we have email addresses. > Messages for those patrons for whom we have no email >@@ -142,16 +146,15 @@ address are sent in a single attachment to the library administrator's > email address, or to the address in the KohaAdminEmailAddress system > preference. > >-C<holds_reminder.pl -lettercode CODE -n -csv /tmp/holds_reminder.csv> - sends no email and >+C<holds_reminder.pl -n -csv /tmp/holds_reminder.csv> - sends no email and > populates F</tmp/holds_reminder.csv> with information about all waiting holds > items. > >-C<holds_reminder.pl -lettercode CODE -library MAIN -days 14> - prepare notices of >+C<holds_reminder.pl -library MAIN -days 14> - prepare notices of > holds waiting for 2 weeks for the MAIN library. > >-C<holds_reminder.pl -library MAIN -days 14 -list-all> - prepare notices >-of holds waiting for 2 weeks for the MAIN library and include all the >-patron's waiting hold >+C<holds_reminder.pl -lettercode LATE_HOLDS -library MAIN -days 14> - prepare notices of >+holds waiting for 2 weeks for the MAIN library. Use lettercode 'LATE_HOLDS' > > =cut > >@@ -185,13 +188,7 @@ GetOptions( > pod2usage(1) if $help; > pod2usage( -verbose => 2 ) if $man; > >-if ( !$lettercode ) { >- pod2usage({ >- -exitval => 1, >- -msg => qq{\nError: You must specify a lettercode to send reminders.\n}, >- }); >-} >- >+$lettercode ||= 'HOLD_REMINDER'; > > cronlogaction(); > >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 15986
:
53323
|
53354
|
53594
|
55723
|
91767
|
91768
|
99919
|
102723
|
102926
|
106962
|
106963
|
106964
|
112999
|
113000
|
113001
|
118733
|
118734
|
118735
|
118736
|
118737
|
119277
|
119308
|
119327
| 119328 |
119329
|
119383
|
119384
|
119386
|
119624
|
119725
|
119748
|
120224