Bug 36008

Summary: SendAlerts should use notice_email_address instead of email
Product: Koha Reporter: David Cook <dcook>
Component: NoticesAssignee: David Cook <dcook>
Status: Pushed to main --- QA Contact: Martin Renvoize (ashimema) <martin.renvoize>
Severity: minor    
Priority: P5 - low CC: martin.renvoize
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33223
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
25.05.00
Circulation function:
Attachments: Bug 36008: Use notice_email_address instead of email for SendAlerts issue type
Bug 36008: Use notice_email_address instead of email for SendAlerts issue type

Description David Cook 2024-02-06 23:11:30 UTC
C4::Letters::SendAlerts() uses $patron->email instead of $patron->notice_email_address
Comment 1 David Cook 2025-01-30 04:45:48 UTC
Still relevant. Should just be a one line change.
Comment 2 David Cook 2025-01-30 05:20:56 UTC
Created attachment 177332 [details] [review]
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
Comment 3 Martin Renvoize (ashimema) 2025-01-30 07:54:32 UTC
Created attachment 177336 [details] [review]
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 <martin.renvoize@ptfs-europe.com>
Comment 4 Martin Renvoize (ashimema) 2025-01-30 07:55:34 UTC
Simple clear fix, qa scripts happy, code is clear.  Tested and working as expected

Passing QA
Comment 5 Katrin Fischer 2025-01-30 17:56:10 UTC
Pushed for 25.05!

Well done everyone, thank you!