@@ -, +, @@ --- Koha/Illrequest.pm | 3 ++- ill/ill-requests.pl | 6 ++---- 2 files changed, 4 insertions(+), 5 deletions(-) --- a/Koha/Illrequest.pm +++ a/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, --- a/ill/ill-requests.pl +++ a/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' --