Bug 30301: Restore check for mandatory notice

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
Matt Blenkinsop 2025-04-17 15:41:09 +01:00 committed by Katrin Fischer
parent c54a14a43f
commit 9b5da196c4
No known key found for this signature in database
GPG Key ID: 0EF6E2C03357A834
1 changed files with 6 additions and 0 deletions

View File

@ -291,6 +291,12 @@ while ( my $expiring_patron = $upcoming_mem_expires->next ) {
message_name => 'Patron_Expiry',
};
my $is_notice_mandatory = grep( $expiring_patron->categorycode, @mandatory_expiry_notice_categories );
if ($is_notice_mandatory) {
$sending_params->{expiry_notice_mandatory} = 1;
$sending_params->{primary_contact_method} = $expiring_patron->primary_contact_method;
}
my $result = $expiring_patron->queue_notice($sending_params);
$count_enqueued++ if $result->{sent};
}