Bugzilla – Attachment 87277 Details for
Bug 22614
Request migration from one backend to another should not create new request
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22614: Migrate original request
Bug-22614-Migrate-original-request.patch (text/plain), 2.06 KB, created by
Andrew Isherwood
on 2019-04-01 13:14:04 UTC
(
hide
)
Description:
Bug 22614: Migrate original request
Filename:
MIME Type:
Creator:
Andrew Isherwood
Created:
2019-04-01 13:14:04 UTC
Size:
2.06 KB
patch
obsolete
>From 4a85cc37c6201bc4a4e1bacf5e93a50bdca064a7 Mon Sep 17 00:00:00 2001 >From: Andrew Isherwood <andrew.isherwood@ptfs-europe.com> >Date: Mon, 1 Apr 2019 14:09:10 +0100 >Subject: [PATCH] Bug 22614: Migrate original request > >This patch changes an active request's backend and initiates the >migration on that request, rather than creating another and migrating >that. > >The majority of the work to accomplish this bug is being carried out in >the backends, since Koha delegates migrations to them. >--- > Koha/Illrequest.pm | 3 ++- > ill/ill-requests.pl | 6 ++---- > 2 files changed, 4 insertions(+), 5 deletions(-) > >diff --git a/Koha/Illrequest.pm b/Koha/Illrequest.pm >index 57e47260dd..d36434ec59 100644 >--- a/Koha/Illrequest.pm >+++ b/Koha/Illrequest.pm >@@ -681,7 +681,8 @@ Migrate a request from one backend to another. > > sub backend_migrate { > my ( $self, $params ) = @_; >- >+ # Set the request's backend to be the destination backend >+ $self->load_backend($params->{backend}); > my $response = $self->_backend_capability('migrate',{ > request => $self, > other => $params, >diff --git a/ill/ill-requests.pl b/ill/ill-requests.pl >index 45f99c2ca3..21097cec00 100755 >--- a/ill/ill-requests.pl >+++ b/ill/ill-requests.pl >@@ -92,14 +92,12 @@ if ( $backends_available ) { > my $request = Koha::Illrequests->find($params->{illrequest_id}); > my $backend_result; > if ( $params->{backend} ) { >- my $new_request = Koha::Illrequest->new->load_backend( $params->{backend} ); >- $backend_result = $new_request->backend_migrate($params); >+ $backend_result = $request->backend_migrate($params); > if ($backend_result) { > $template->param( > whole => $backend_result, >- request => $new_request >+ request => $request > ); >- $request = $new_request; > } else { > # Backend failure, redirect back to illview > print $cgi->redirect( '/cgi-bin/koha/ill/ill-requests.pl' >-- >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 22614
:
87277
|
87357
|
122645
|
123342