Bugzilla – Attachment 79380 Details for
Bug 21289
Error when sending emails to partner libraries
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21289: Fix "isa" bug during partner request
Bug-21289-Fix-isa-bug-during-partner-request.patch (text/plain), 2.85 KB, created by
PTFS Europe Sandboxes
on 2018-09-25 14:38:46 UTC
(
hide
)
Description:
Bug 21289: Fix "isa" bug during partner request
Filename:
MIME Type:
Creator:
PTFS Europe Sandboxes
Created:
2018-09-25 14:38:46 UTC
Size:
2.85 KB
patch
obsolete
>From a399f4475177ed1dabd430ab6fa8f21d611cf0b7 Mon Sep 17 00:00:00 2001 >From: Andrew Isherwood <andrew.isherwood@ptfs-europe.com> >Date: Thu, 30 Aug 2018 10:52:43 +0100 >Subject: [PATCH] Bug 21289: Fix "isa" bug during partner request > >We cannot call 'handle_commit_maybe' inside a 'try' block. >handle_commit_maybe redirects the client then calls 'exit', this is >interpreted as an error and the 'catch' block is erroneously called. > >This patch moves the calling of 'handle_commit_maybe' outside the try >block, it will only be reached if everything inside the try block >suceeds. > >To test: >1) Enable ILL and have the FreeForm backend available >2) Create a patron category to hold ILL "partners" to whom requests can >be sent. The category can be called anything, you should note the code >you assign >3) Create a patron that belongs to your new category, the patron must >have a primary email defined. >4) In your <interlibrary_loans> block in koha-conf.xml, ensure you have >a <partner_code> element, it should contain the code you assigned in >step 2 >5) Create an ILL request using the FreeForm backend >6) Once the request is created, select the "Place request with partners" >button >7) Select your "partner" from the "Select partner libraries" box >8) Click "Send email" >9) TEST: Observe no errors are displayed in the UI > >Signed-off-by: Barry Cannon <bc@interleaf.ie> >--- > ill/ill-requests.pl | 12 +++++++----- > 1 file changed, 7 insertions(+), 5 deletions(-) > >diff --git a/ill/ill-requests.pl b/ill/ill-requests.pl >index 47cfc97050..48190b6a26 100755 >--- a/ill/ill-requests.pl >+++ b/ill/ill-requests.pl >@@ -184,19 +184,18 @@ if ( $backends_available ) { > handle_commit_maybe($backend_result, $request); > > } elsif ( $op eq 'generic_confirm' ) { >+ my $backend_result; >+ my $request; > try { >- my $request = Koha::Illrequests->find($params->{illrequest_id}); >+ $request = Koha::Illrequests->find($params->{illrequest_id}); > $params->{current_branchcode} = C4::Context->mybranch; >- my $backend_result = $request->generic_confirm($params); >+ $backend_result = $request->generic_confirm($params); > $template->param( > whole => $backend_result, > request => $request, > ); > $template->param( error => $params->{error} ) > if $params->{error}; >- >- # handle special commit rules & update type >- handle_commit_maybe($backend_result, $request); > } > catch { > my $error; >@@ -216,6 +215,9 @@ if ( $backends_available ) { > "&error=$error" ); > exit; > }; >+ >+ # handle special commit rules & update type >+ handle_commit_maybe($backend_result, $request); > } elsif ( $op eq 'illlist') { > > # If we receive a pre-filter, make it available to the template >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 21289
:
78309
|
79380
|
79663