Bugzilla – Attachment 86237 Details for
Bug 18837
Add an unmediated Interlibrary Loans workflow
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18837: Introduce delegation to backends for unmediated workflows
Bug-18837-Introduce-delegation-to-backends-for-unm.patch (text/plain), 2.16 KB, created by
Andrew Isherwood
on 2019-03-07 09:09:56 UTC
(
hide
)
Description:
Bug 18837: Introduce delegation to backends for unmediated workflows
Filename:
MIME Type:
Creator:
Andrew Isherwood
Created:
2019-03-07 09:09:56 UTC
Size:
2.16 KB
patch
obsolete
>From f039ae30523b52a6022d7a29cee3227280ffe1e4 Mon Sep 17 00:00:00 2001 >From: Andrew Isherwood <andrew.isherwood@ptfs-europe.com> >Date: Thu, 26 Apr 2018 12:04:58 +0100 >Subject: [PATCH] Bug 18837: Introduce delegation to backends for unmediated > workflows > >This patch adds support to Illrequest.pm to allow delegation of >unmediated requests to happen in backends that support them. > >It is a recreation of >https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=66629&action=diff >which had diverged sufficiently as to make it impossible to apply > >Signed-off-by: Stephen Graham <s.graham4@herts.ac.uk> >Signed-off-by: David Peacock <d.m.peacock@herts.ac.uk> >Signed-off-by: Jayne Maisey <j.maisey@herts.ac.uk> >--- > Koha/Illrequest.pm | 18 +++++++++++++++++- > 1 file changed, 17 insertions(+), 1 deletion(-) > >diff --git a/Koha/Illrequest.pm b/Koha/Illrequest.pm >index 5f7019a139..ae7822344b 100644 >--- a/Koha/Illrequest.pm >+++ b/Koha/Illrequest.pm >@@ -352,12 +352,14 @@ capabilities & custom_capability and their callers. > sub _backend_capability { > my ( $self, $name, $args ) = @_; > my $capability = 0; >+ # See if capability is defined in backend > try { > $capability = $self->_backend->capabilities($name); > } catch { > return 0; > }; >- if ( $capability ) { >+ # Try to invoke it >+ if ( $capability && ref($capability) eq 'CODE' ) { > return &{$capability}($args); > } else { > return 0; >@@ -819,6 +821,20 @@ sub backend_create { > # ...Updating status! > $self->status('QUEUED')->store unless ( $permitted ); > >+ ## Handle Unmediated ILLs >+ >+ # For the unmediated workflow we only need to delegate to our backend. If >+ # that backend supports unmediateld_ill, it will do its thing and return a >+ # proper response. If it doesn't then _backend_capability returns 0, so >+ # we keep the current result. >+ if ( C4::Context->preference("ILLModuleUnmediated") && $permitted ) { >+ my $unmediated_result = $self->_backend_capability( >+ 'unmediated_ill', >+ $args >+ ); >+ $result = $unmediated_result if $unmediated_result; >+ } >+ > return $self->expandTemplate($result); > } > >-- >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 18837
:
66628
|
66629
|
74874
|
74875
|
79542
|
79543
|
82158
|
82159
|
82508
|
82509
|
86188
|
86189
|
86236
|
86237
|
86238
|
86371
|
86372
|
86373
|
86374
|
86375
|
86422
|
86423
|
86424
|
86425
|
86426