Bugzilla – Attachment 176156 Details for
Bug 30300
Add patron expiration email to patron messaging preferences
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 30300: (QA follow-up) Move logic to queue_notice
Bug-30300-QA-follow-up-Move-logic-to-queuenotice.patch (text/plain), 3.04 KB, created by
Martin Renvoize (ashimema)
on 2025-01-06 15:27:57 UTC
(
hide
)
Description:
Bug 30300: (QA follow-up) Move logic to queue_notice
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2025-01-06 15:27:57 UTC
Size:
3.04 KB
patch
obsolete
>From 9315072cc27621ec80c6e4e8df178fd940fec469 Mon Sep 17 00:00:00 2001 >From: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> >Date: Thu, 31 Oct 2024 16:11:59 +0000 >Subject: [PATCH] Bug 30300: (QA follow-up) Move logic to queue_notice > >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > Koha/Patron.pm | 3 ++- > misc/cronjobs/membership_expiry.pl | 25 +++++++------------------ > 2 files changed, 9 insertions(+), 19 deletions(-) > >diff --git a/Koha/Patron.pm b/Koha/Patron.pm >index 20ac75196d8..aad297db076 100644 >--- a/Koha/Patron.pm >+++ b/Koha/Patron.pm >@@ -2653,7 +2653,8 @@ sub queue_notice { > message_name => $params->{message_name} > } ); > @message_transports = ( keys %{ $messaging_prefs->{transports} } ); >- $letter_code = $messaging_prefs->{transports}->{$message_transports[0]} unless $letter_code; >+ $letter_code = $messaging_prefs->{transports}->{ $message_transports[0] } unless $letter_code; >+ return if ( $params->{message_name} eq 'Patron_Expiry' && !$messaging_prefs ); > } else { > @message_transports = @{$params->{message_transports}}; > } >diff --git a/misc/cronjobs/membership_expiry.pl b/misc/cronjobs/membership_expiry.pl >index d2cd0a6595d..50e213d9620 100755 >--- a/misc/cronjobs/membership_expiry.pl >+++ b/misc/cronjobs/membership_expiry.pl >@@ -262,40 +262,29 @@ while ( my $expiring_patron = $upcoming_mem_expires->next ) { > next; > } > >- my $messaging_prefs = C4::Members::Messaging::GetMessagingPreferences( >- { >- borrowernumber => $expiring_patron->borrowernumber, >- message_name => "Patron_Expiry", >- } >- ); >- my @message_transports = ( keys %{ $messaging_prefs->{transports} } ); >- my $letter_code = $messaging_prefs->{letter_code}; >- >- # Skip this patron if they don't want a notification email for card expiry >- next if !$messaging_prefs; >- > my $which_notice; > if ($renew) { > $expiring_patron->renew_account; > $which_notice = $letter_renew; > $count_renewed++; > } else { >- $which_notice = $letter_code || $letter_expiry; >+ $which_notice = $letter_expiry; > } > > my $from_address = $expiring_patron->library->from_email_address; > my $letter_params = { >- module => 'members', >- letter_code => $which_notice, >- branchcode => $expiring_patron->branchcode, >- lang => $expiring_patron->lang, >+ module => 'members', >+ letter_code => $which_notice, >+ branchcode => $expiring_patron->branchcode, >+ lang => $expiring_patron->lang, > borrowernumber => $expiring_patron->borrowernumber, >- tables => { >+ tables => { > borrowers => $expiring_patron->borrowernumber, > branches => $expiring_patron->branchcode, > }, > }; > >+ > my $sending_params = { > letter_params => $letter_params, > message_name => 'Patron_Expiry', >-- >2.47.1
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 30300
:
169860
|
169861
|
169870
|
169871
|
173810
|
173811
|
173812
|
173820
|
173821
|
173822
|
173823
|
174713
|
174714
|
174715
|
174716
|
174717
|
174888
|
176154
|
176155
| 176156 |
176157
|
176158
|
176159