From 3aca9d5018f94ac59178b22f982345286ca6795d Mon Sep 17 00:00:00 2001 From: Pedro Amorim Date: Fri, 20 Jun 2025 10:30:17 +0000 Subject: [PATCH] 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: /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. --- Koha/ILL/Request.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Koha/ILL/Request.pm b/Koha/ILL/Request.pm index 9b151e3924c..4c8453d4dd5 100644 --- a/Koha/ILL/Request.pm +++ b/Koha/ILL/Request.pm @@ -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 ); -- 2.39.5