Bugzilla – Attachment 176124 Details for
Bug 38751
Creating ILL request through OPAC openURL explodes if same attribute defined twice
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 38751: Update Standard ILL backend migrate
Bug-38751-Update-Standard-ILL-backend-migrate.patch (text/plain), 2.05 KB, created by
Pedro Amorim
on 2025-01-03 16:07:08 UTC
(
hide
)
Description:
Bug 38751: Update Standard ILL backend migrate
Filename:
MIME Type:
Creator:
Pedro Amorim
Created:
2025-01-03 16:07:08 UTC
Size:
2.05 KB
patch
obsolete
>From b9a709af45297542b8a81952e9a7d1f80dcd9f6f Mon Sep 17 00:00:00 2001 >From: Pedro Amorim <pedro.amorim@ptfs-europe.com> >Date: Fri, 3 Jan 2025 12:15:47 -0100 >Subject: [PATCH] Bug 38751: Update Standard ILL backend migrate > >Make use of newly updated ILL::Request->extended_attributes method instead of creating the query manually > >The test plan in bug 38819 fails without this patch (page explodes with duplicate ID error). >It's the same cause as the one being fixed here in bug 38751 so I'm submitting this here. >--- > Koha/ILL/Backend/Standard.pm | 26 +++++++++++++------------- > 1 file changed, 13 insertions(+), 13 deletions(-) > >diff --git a/Koha/ILL/Backend/Standard.pm b/Koha/ILL/Backend/Standard.pm >index 1054efd296b..231045b19e9 100644 >--- a/Koha/ILL/Backend/Standard.pm >+++ b/Koha/ILL/Backend/Standard.pm >@@ -710,19 +710,19 @@ sub migrate { > my $original_attributes = > $original_request->extended_attributes->search( { type => { '-in' => \@default_attributes } } ); > >- my $request_details = >- { map { $_->type => $_->value } ( $original_attributes->as_list ) }; >- $request_details->{migrated_from} = $original_request->illrequest_id; >- while ( my ( $type, $value ) = each %{$request_details} ) { >- Koha::ILL::Request::Attribute->new( >- { >- illrequest_id => $new_request->illrequest_id, >- column_exists( 'illrequestattributes', 'backend' ) ? ( backend => "Standard" ) : (), >- type => $type, >- value => $value, >- } >- )->store; >- } >+ my @request_details_array = map { >+ { >+ 'type' => $_->type, >+ 'value' => $_->value, >+ } >+ } $original_attributes->as_list; >+ >+ push @request_details_array, { >+ 'type' => 'migrated_from', >+ 'value' => $original_request->illrequest_id, >+ }; >+ >+ $new_request->extended_attributes( \@request_details_array ); > > return { > error => 0, >-- >2.39.5
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 38751
:
175700
|
175701
|
175702
|
175703
|
175704
|
175705
|
175903
|
175904
|
175905
|
176124
|
176250
|
176251
|
176252
|
176253