Bug 15986: Add sample notice and use as default

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Nick Clemens 2021-04-08 14:43:10 +00:00 committed by Jonathan Druart
parent b2812c418d
commit a351b2379b
2 changed files with 22 additions and 14 deletions

View file

@ -1233,6 +1233,17 @@ tables:
content: content:
- "A hold has been placed on the following item : <<biblio.title>> (<<biblio.biblionumber>>) by the user <<borrowers.firstname>> <<borrowers.surname>> (<<borrowers.cardnumber>>)." - "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 - module: serial
code: SERIAL_ALERT code: SERIAL_ALERT
branchcode: "" branchcode: ""

View file

@ -57,7 +57,7 @@ holds_reminder.pl
-v verbose -v verbose
-n No email will be sent -n No email will be sent
-days <days> days waiting to deal with -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) -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 -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 -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 to send a message for. If not included a notice will be sent to all
patrons with waiting holds. patrons with waiting holds.
=item B<-lettercode>
Optional parameter, choose a notice to use. Default is 'HOLD_REMINDER'.
=item B<-library> =item B<-library>
select notices for one specific library. Use the value in the 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> - 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 libraries are processed individually, and notices are prepared for
all patrons with waiting holds for whom we have email addresses. all patrons with waiting holds for whom we have email addresses.
Messages for those patrons for whom we have no email 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 email address, or to the address in the KohaAdminEmailAddress system
preference. 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 populates F</tmp/holds_reminder.csv> with information about all waiting holds
items. 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. holds waiting for 2 weeks for the MAIN library.
C<holds_reminder.pl -library MAIN -days 14 -list-all> - prepare notices C<holds_reminder.pl -lettercode LATE_HOLDS -library MAIN -days 14> - prepare notices of
of holds waiting for 2 weeks for the MAIN library and include all the holds waiting for 2 weeks for the MAIN library. Use lettercode 'LATE_HOLDS'
patron's waiting hold
=cut =cut
@ -185,13 +188,7 @@ GetOptions(
pod2usage(1) if $help; pod2usage(1) if $help;
pod2usage( -verbose => 2 ) if $man; pod2usage( -verbose => 2 ) if $man;
if ( !$lettercode ) { $lettercode ||= 'HOLD_REMINDER';
pod2usage({
-exitval => 1,
-msg => qq{\nError: You must specify a lettercode to send reminders.\n},
});
}
cronlogaction(); cronlogaction();