Bug 40171

Summary: ILL Patron Has No Email Address on File message upon "Send Notice To Patron"
Product: Koha Reporter: Susan McLeran <tech>
Component: ILLAssignee: Pedro Amorim <pedro.amorim>
Status: Signed Off --- QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: david, pedro.amorim, tomascohen
Version: Main   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: Trivial patch Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: Bug 40171: Fix tt param name
Bug 40171: Remove extraneous join()
Bug 40171: Return fail if no transports for patron
Bug 40171: Fix tt param name
Bug 40171: Remove extraneous join()
Bug 40171: Return fail if no transports for patron
Bug 40171: Fix tt param name
Bug 40171: Remove extraneous join()
Bug 40171: Return fail if no transports for patron

Description Susan McLeran 2025-06-18 20:33:31 UTC
In using the ILL module, I noticed that when using the "Send Notice to Patron" button, I get no feedback as to whether the notification was sent successfully.  Specifically, I had an ILL request from a patron with no email address on file.  I assumed that an email was sent to the patron after clicking the button, but since he had no email address on file, he wasn't notified.  It would be really helpful to have a message pop up saying "Patron has no email address on file.  Please call XXX-XXX-XXXX to let them know that their ILL request has arrived." (or something similar) so that the staff member knows they need to call the patron.
Comment 1 Pedro Amorim 2025-06-20 10:35:09 UTC
Created attachment 183383 [details] [review]
Bug 40171: Fix tt param name

Its tran_fail, not tran_error.
Comment 2 Pedro Amorim 2025-06-20 10:35:12 UTC
Created attachment 183384 [details] [review]
Bug 40171: Remove extraneous join()
Comment 3 Pedro Amorim 2025-06-20 10:35:14 UTC
Created attachment 183385 [details] [review]
Bug 40171: Return fail if no transports for patron

Test plan, k-t-d, don't apply patches yet:
1) Enable ILLModule
2) Create a new ill request at:
<staff_url>/cgi-bin/koha/ill/ill-requests.pl?method=create&backend=Standard
3) Pick any type and any library, pick '42' for patron. This is the 'koha' user.
4) Create the request, click 'Send notice to patron'. Pick any template. Notice nothing is shown on the UI.
5) Apply patches. Repeat.
Comment 4 David Nind 2025-06-26 20:18:59 UTC
Testing notes (using KTD):

1. With no email set for a patron, I now get a message in a yellow background "The requested notice was NOT queued for delivery by email, SMS".

2. However, with a valid email address and a working SMTP server (the patron welcome message is sent after processing the message queue), I still get the same message - that is, the notice is not queued.
Comment 5 Pedro Amorim 2025-06-27 09:46:00 UTC
Created attachment 183593 [details] [review]
Bug 40171: Fix tt param name

Its tran_fail, not tran_error.
Comment 6 Pedro Amorim 2025-06-27 09:46:02 UTC
Created attachment 183594 [details] [review]
Bug 40171: Remove extraneous join()
Comment 7 Pedro Amorim 2025-06-27 09:46:04 UTC
Created attachment 183595 [details] [review]
Bug 40171: Return fail if no transports for patron

Test plan, k-t-d, don't apply patches yet:
1) Enable ILLModule
2) Create a new ill request at:
<staff_url>/cgi-bin/koha/ill/ill-requests.pl?method=create&backend=Standard
3) Pick any type and any library, pick '42' for patron. This is the 'koha' user.
4) Create the request, click 'Send notice to patron'. Pick any template. Notice nothing is shown on the UI.
5) Apply patches. Repeat. Notice you get the message:
  "The requested notice was NOT queued for delivery by email, SMS".
6) Edit the 'koha' patron and tick the following boxes on 'Patron messaging preferences':
   - Interlibrary loan ready
   - Interlibrary loan unavailable
7) Go back to the request and click 'Send notice to patron' and pick any option again. Notice now you get a success message.
Comment 8 Pedro Amorim 2025-06-27 09:46:53 UTC
(In reply to David Nind from comment #4)
> 2. However, with a valid email address and a working SMTP server (the patron
> welcome message is sent after processing the message queue), I still get the
> same message - that is, the notice is not queued.

Thank you David, I missed some steps on my original test plan:

6) Edit the 'koha' patron and tick the following boxes on 'Patron messaging preferences':
   - Interlibrary loan ready
   - Interlibrary loan unavailable
7) Go back to the request and click 'Send notice to patron' and pick any option again. Notice now you get a success message.

Can you please give it another go when possible?
Comment 9 David Nind 2025-06-27 19:33:17 UTC
Created attachment 183627 [details] [review]
Bug 40171: Fix tt param name

Its tran_fail, not tran_error.

Signed-off-by: David Nind <david@davidnind.com>
Comment 10 David Nind 2025-06-27 19:33:20 UTC
Created attachment 183628 [details] [review]
Bug 40171: Remove extraneous join()

Signed-off-by: David Nind <david@davidnind.com>
Comment 11 David Nind 2025-06-27 19:33:23 UTC
Created attachment 183629 [details] [review]
Bug 40171: Return fail if no transports for patron

Test plan, k-t-d, don't apply patches yet:
1) Enable ILLModule
2) Create a new ill request at:
<staff_url>/cgi-bin/koha/ill/ill-requests.pl?method=create&backend=Standard
3) Pick any type and any library, pick '42' for patron. This is the 'koha' user.
4) Create the request, click 'Send notice to patron'. Pick any template. Notice nothing is shown on the UI.
5) Apply patches. Repeat. Notice you get the message:
  "The requested notice was NOT queued for delivery by email, SMS".
6) Edit the 'koha' patron and tick the following boxes on 'Patron messaging preferences':
   - Interlibrary loan ready
   - Interlibrary loan unavailable
7) Go back to the request and click 'Send notice to patron' and pick any option again. Notice now you get a success message.

Signed-off-by: David Nind <david@davidnind.com>