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>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 4bd5b58cd9)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This commit is contained in:
parent
85bcc44aa7
commit
82c23565be
|
|
@ -1776,6 +1776,8 @@ sub send_patron_notice {
|
|||
);
|
||||
my @transports = keys %{ $borrower_preferences->{transports} };
|
||||
|
||||
return { result => { fail => [ 'email', 'sms' ], success => [] } } unless @transports;
|
||||
|
||||
# Notice should come from the library where the request was placed,
|
||||
# not the patrons home library
|
||||
my $branch = Koha::Libraries->find( $self->branchcode );
|
||||
|
|
|
|||
Loading…
Reference in New Issue