Koha/misc
PerplexedTheta 3040f46d5e
Bug 32216: Add print notices to membership_expiry.pl
This patch adds print notice functionality to the membership_expiry.pl script,
by adding both conditional and and forced modes. When passing only --confirm,
the script will check the patron's record for an email address. If one is
found, an email notice is generated. If one is not, a print notice is used
instead. By adding a -p flag, print notices will be generated, even if an
email address is present.

To test:
a)  set the MembershipExpiryDaysNotice syspref to 7 days
b)  choose or set up half a dozen patrons with expiry dates
    1)  take heed: these expiry dates will need to be T+7 days
c)  add fake email addresses to two of the patrons
    1)  take heed: the other patrons should have no primary or secondary
        email
d)  set up the MEMBERSHIP_EXPIRY notice
    a)  set content & subject in the email notice to contain the word
        email
    b)  set content & subject in the print notice to contain the word
        print
e)  run ./misc/cronjobs/membership_expiry.pl -n -c
    1)  notice how the printed notices contain the word email
f)  run ./misc/cronjobs/membership_expiry.pl -c
g)  check the notices for the patrons from step b
    1)  notice how only email notices are generated
h)  APPLY PATCH
i)  repeat step e
    1)  notice how a mix of email and print notices are now generated
j)  run ./misc/cronjobs/membership_expiry.pl -n -p -c
    1)  notice how the output is the same as in step i - this is by
        design
k)  repeat steps f-g
    1)  notice how some patrons will only get an email notice, whilst
        others will only get a print notice
    2)  this should occur based on which patrons do, or do not have a
        valid primary or secondary email
l)  run ./misc/cronjobs/membership_expiry.pl -p -c
m)  repeat step g
    1)  notice that all patrons now get a print notice, whilst some get
        both a print notice, and an email notice. Again, this should
        occur based on whether the patron has a valid primary or
        secondary email
n)  SIGN OFF

Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-27 17:32:32 +01:00
..
admin Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
bin Bug 38382: Fresh connection when connexion CSRF token expires 2024-12-20 18:33:25 +01:00
cronjobs Bug 32216: Add print notices to membership_expiry.pl 2025-02-27 17:32:32 +01:00
devel Bug 39149: Make tidy.pl deal with .PL files 2025-02-18 15:35:52 +01:00
interface_customization
maintenance Bug 38762: Make compare_es_to_db.pl provide links to staff interface 2025-02-19 17:05:37 +01:00
migration_tools Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
release_notes 24.11.00: Add missing manual contributors to release notes 2024-12-03 14:36:23 +01:00
search_tools Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
translator Bug 38871: Remove sub string_list from misc/translator/xgettext.pl 2025-02-19 17:05:36 +01:00
workers Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
add_date_fields_to_marc_records.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
add_statistics_borrowers_categorycode.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
batchCompareMARCvsFrameworks.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
batchdeletebiblios.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
batchDeleteUnusedSubfields.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
batchImportMARCWithBiblionumbers.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
batchRebuildBiblioTables.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
batchRebuildItemsTables.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
batchRepairMissingBiblionumbers.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
check_sysprefs.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
commit_file.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
export_borrowers.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
export_records.pl Bug 36770: (QA follow-up) Tidy export_records.pl 2024-08-09 18:44:54 +02:00
import_patrons.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
koha-install-log
link_bibs_to_authorities.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
load_yaml.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
mod_zebraqueue.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
process_ill_updates.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
recreateIssueStatistics.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
sax_parser_print.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
sax_parser_test.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
sip_cli_emulator.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
stage_file.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
z3950_responder.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00