Bug 26203

Summary: Message enqueued with no to_address when using CanMarkHoldsToPullAsLost for patron without an email address
Product: Koha Reporter: Andrew Fuerste-Henry <andrew>
Component: CirculationAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: gmcharlt, jonathan.druart, kyle.m.hall
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Bug Depends on: 19287    
Bug Blocks:    

Description Andrew Fuerste-Henry 2020-08-13 13:45:47 UTC
To recreate:
- set CanMarkHoldsToPullAsLost to allow to mark items as lost and notify patron
- find a patron with no email address
- create an item-level hold for that patron
- from the Holds to Pull list, click Mark lost and notify patron
- Koha gives contradictory messages "the patron does not have an email address defined" and "the message was enqueued correctly"
- notice shows as pending email in patron account but has no to_address in the database

We should either fail over to print notice when the patron doesn't have an email address or just not generate a notice at all.
Comment 1 Jonathan Druart 2020-08-25 13:30:22 UTC
I understand they feel contradictory messages, but it's actually what happened: the notice is enqueued without a to_address.
If empty, to_address will be set to the patron's email address when the message is sent. So a librarian can eventually update it in the meanwhile.

Afaik it's the same behaviour for a lot of other notices.