From 8d5b477663dce7bcf0de1f38b7699b134d81b6ad Mon Sep 17 00:00:00 2001 From: David Cook Date: Thu, 30 Jan 2025 05:18:34 +0000 Subject: [PATCH] Bug 36008: Use notice_email_address instead of email for SendAlerts issue type This change makes Koha use "notice_email_address" instead of "email" for SendAlerts with a type of "issue". This brings SendAlerts more in line with the rest of Koha Test plan: 0. Apply the patch 1. Create a subscription - Go to http://localhost:8081/cgi-bin/koha/serials/serials-home.pl - Click "New subscription" and follow the prompts / fill out required fields - On the first screen, ensure "Patron notification" says "New serial issue" (You can edit this after creating the subscription if necessary) 2. Click "subscribers" next to "Patron notification: SERIAL_ALERT" 3. Log into the OPAC, go to the bib record for that subscription, click "Subscriptions", and click "Subscribe to email notification on new issues" and click "Yes" on the subsequent screen 4. Edit your patron record and make sure you have an email in "Secondary email" and not "Primary email" 5. Set up a SMTP server for your Koha or some other email delivery mechanism 6. Go to the "Serial collection" for your subscription e.g. http://localhost:8081/cgi-bin/koha/serials/serials-collection.pl?subscriptionid=1 7. Click "Receive" 8. Mark the serial as "Arrived" 9. Click "Save" 10. Note that you receive an email using your Koha user's "Secondary Email" address Signed-off-by: Martin Renvoize --- C4/Letters.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C4/Letters.pm b/C4/Letters.pm index bfcaacbe902..122231b87d9 100644 --- a/C4/Letters.pm +++ b/C4/Letters.pm @@ -308,7 +308,7 @@ sub SendAlerts { my $subscription = Koha::Subscriptions->find( $subscriptionid ); my $subscribers = $subscription->subscribers; while ( my $patron = $subscribers->next ) { - my $email = $patron->email or next; + my $email = $patron->notice_email_address or next; # warn "sending issues..."; my $userenv = C4::Context->userenv; -- 2.48.1