Koha/misc
Marcel de Rooy 52d30fba7b Bug 15543: Use another notice in membership_expiry.pl
This patch adds a letter parameter to the cron job membership_expiry.
It is used to substitute the default notice by another one.
This could be handy if you e.g. send a reminder after the first notice.
In any case, it allows for more flexibility.

Apart from this new parameter, this patch removes the sub parse_letter from
the code. The call to GetPreparedLetter is moved to the for loop and the
call to getletter is removed (no longer needed). If there is no letter
found, the Letter module already warns you. So we just exit the loop.

Test plan:
[1] Run membership_expiry.pl -c -n -v -let NOT_EXIST
    Check if you see a warning (coming from Letters.pm)
[2] Check if you have some soon expiring patrons or add before/after
    parameter to include some.
    Run membership_expiry.pl -c -n -v [-before ?] [-after ?]
[3] Create a new notice MEMBERSHIP2. Copy the text from the original notice
    and make some adjustments.
[4] Run membership_expiry.pl -c -v -let MEMBERSHIP2 [-before ?] [-after ?].
    Be aware that this call generates email messages.
    Verify that the email contained the adjusted text.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>

On top of Bug 14834
Work as described, tested using '-n' to see messages on terminal, e.g.
membership_expiry.pl -v -n -c -before 3 -branch BC -after 2 --letter MEMEXP2
No errors

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-04-29 16:58:58 +00:00
..
admin Bug 11998: Do not clear syspref cache in psgi file 2016-03-15 07:08:29 +00:00
bin Revert Bug 11081 - Port Koha::Contrib::Tamil indexer into Koha code base 2016-03-01 16:56:35 +00:00
cronjobs Bug 15543: Use another notice in membership_expiry.pl 2016-04-29 16:58:58 +00:00
devel Bug 14383: misc: Fix some typos in comments and documentation 2015-06-22 17:34:45 -03:00
interface_customization Bug 10415 - Add course reserves to staff client home page 2014-03-12 18:15:24 +00:00
load_testing Bug 14383: misc: Fix some typos in comments and documentation 2015-06-22 17:34:45 -03:00
maintenance Bug 16011: $VERSION - Remove comments 2016-03-24 17:20:29 +00:00
migration_tools Bug 12478: make things using SimpleSearch use the new version 2016-04-26 20:20:07 +00:00
plack Bug 16044: Use the L1 cache for any objects set in cache 2016-03-24 19:44:43 +00:00
release_notes Bug 16106 Correct loose to lose in comment 2016-03-22 01:47:53 +00:00
search_tools Bug 12478: abort early if there's no elasticserch definition 2016-04-26 20:20:10 +00:00
translator Bug 16194: Do not consider xslt as valid theme dir in LangInstaller.pm 2016-04-05 15:18:06 +00:00
batchCompareMARCvsFrameworks.pl Bug 2505 - Add commented use warnings where missing in the misc/ directory 2010-04-21 20:26:44 +12:00
batchdeletebiblios.pl Bug 8674 follow-up Fix perlcritic error 2012-10-02 17:48:03 +02:00
batchDeleteUnusedSubfields.pl Bug 2505 - Add commented use warnings where missing in the misc/ directory 2010-04-21 20:26:44 +12:00
batchImportMARCWithBiblionumbers.pl Bug 8576: Software error on authority edition when using merge 2012-08-28 17:55:33 +02:00
batchRebuildBiblioTables.pl Bug 16169: Change prototype for C4::Biblio::TransformMarcToKoha 2016-04-07 00:04:21 +00:00
batchRebuildItemsTables.pl Bug 14858: removed record length limit test 2015-10-06 10:28:29 -03:00
batchRepairMissingBiblionumbers.pl Repair the old repairmissingbiblionumbers script 2009-04-18 15:39:24 -05:00
batchupdateISBNs.pl Bug 9978: (followup) Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:43 -03:00
check_sysprefs.pl MT3289 : check_sysprefs.pl case sensitive variable names 2011-03-31 15:23:24 +13:00
commit_file.pl Bug 7131: (follow-up) update the command-line import tools 2013-10-30 04:35:17 +00:00
export_borrowers.pl Bug 9892: [QA Follow-up] Typo and updated usage 2015-05-19 09:23:18 -03:00
export_records.pl Bug 15923: Fix --id_list_file option for misc/export_records.pl 2016-03-02 00:43:11 +00:00
exportauth.pl Bug 6755 Problems with switching languages 2011-09-23 09:47:09 +12:00
koha-install-log Bug 10712: Save missing config variables to install log 2013-08-13 14:14:30 +00:00
kohalib.pl Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
link_bibs_to_authorities.pl Bug 8818: make sure we load modules before using them 2012-10-01 19:01:50 +02:00
mod_zebraqueue.pl Bug 9978: (followup) Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:43 -03:00
perlmodule_ls.pl Bug 2505 - add strict and warnings to perlmodule_ls 2010-04-21 20:30:52 +12:00
perlmodule_rm.pl Bug 2505 - remove unnecessary -w and replace with use warnings; 2010-04-07 13:27:07 -04:00
recreateIssueStatistics.pl Bug 6025: Adds a script that re-create missing statistics from issues and old_issues tables 2012-03-20 17:02:33 +01:00
sax_parser_print.pl Bug 2617: Add strict (and warnings), partial fix. 2009-03-11 08:36:55 -05:00
sax_parser_test.pl Bug 6752: Be stricter with utf-8 encoding of output 2012-01-27 12:11:06 +01:00
sip_cli_emulator.pl Bug 14512 - Add support for AV field to Koha's SIP2 Server 2016-03-31 20:29:18 +00:00
stage_file.pl Bug 12289: (follow-up) fix the compilation error 2015-12-30 21:11:16 +00:00