Bugzilla – Attachment 190909 Details for
Bug 39934
Standard backend shows attributes from previously "migrated from" backends
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 39934: Use _get_core_fields as fields to be migrated
Bug-39934-Use-getcorefields-as-fields-to-be-migrat.patch (text/plain), 1.71 KB, created by
David Nind
on 2026-01-05 18:56:51 UTC
(
hide
)
Description:
Bug 39934: Use _get_core_fields as fields to be migrated
Filename:
MIME Type:
Creator:
David Nind
Created:
2026-01-05 18:56:51 UTC
Size:
1.71 KB
patch
obsolete
>From 7d0bf04b1004b7b5ec22772010056245ae3b24b1 Mon Sep 17 00:00:00 2001 >From: Pedro Amorim <pedro.amorim@openfifth.co.uk> >Date: Mon, 19 May 2025 10:17:10 +0000 >Subject: [PATCH] Bug 39934: Use _get_core_fields as fields to be migrated > >Also add backend check to add_or_update_attributes > >Signed-off-by: David Nind <david@davidnind.com> >--- > Koha/ILL/Backend/Standard.pm | 3 ++- > Koha/ILL/Request.pm | 3 +-- > 2 files changed, 3 insertions(+), 3 deletions(-) > >diff --git a/Koha/ILL/Backend/Standard.pm b/Koha/ILL/Backend/Standard.pm >index f29b72046a..ab0b8a7659 100644 >--- a/Koha/ILL/Backend/Standard.pm >+++ b/Koha/ILL/Backend/Standard.pm >@@ -677,7 +677,8 @@ sub migrate { > $new_request->updated( dt_from_string() ); > $new_request->store; > >- my @default_attributes = (qw/title type author year volume isbn issn article_title article_author pages/); >+ my %core_fields = %{ _get_core_fields() }; >+ my @default_attributes = keys %core_fields; > my $original_attributes = > $original_request->extended_attributes->search( { type => { '-in' => \@default_attributes } } ); > >diff --git a/Koha/ILL/Request.pm b/Koha/ILL/Request.pm >index 5e76fc5889..2d019803f8 100644 >--- a/Koha/ILL/Request.pm >+++ b/Koha/ILL/Request.pm >@@ -1350,8 +1350,7 @@ sub add_or_update_attributes { > # Skip undefined or empty values > next unless defined $value && $value ne ''; > >- my $attr = $self->extended_attributes->find( { type => $type } ); >- >+ my $attr = $self->extended_attributes->find( { backend => $self->backend, type => $type } ); > if ($attr) { > > # Update existing attribute only if value changed >-- >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 39934
:
182581
|
182582
|
182583
|
190887
|
190888
|
190889
|
190908
| 190909 |
190910