Bugzilla – Attachment 182581 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: Only fetch attributes from 'Standard'
Bug-39934-Only-fetch-attributes-from-Standard.patch (text/plain), 1.63 KB, created by
Pedro Amorim
on 2025-05-19 10:44:39 UTC
(
hide
)
Description:
Bug 39934: Only fetch attributes from 'Standard'
Filename:
MIME Type:
Creator:
Pedro Amorim
Created:
2025-05-19 10:44:39 UTC
Size:
1.63 KB
patch
obsolete
>From de2708e788108711a1d7859523edc15d3c64bd01 Mon Sep 17 00:00:00 2001 >From: Pedro Amorim <pedro.amorim@openfifth.co.uk> >Date: Fri, 16 May 2025 16:07:12 +0000 >Subject: [PATCH] Bug 39934: Only fetch attributes from 'Standard' > >Furthermore, this now only shows metadata present in _get_core_fields, >so a list of attributes to ignore is not longer needed (they're not in >_get_core_fields). >--- > Koha/ILL/Backend/Standard.pm | 14 ++++---------- > 1 file changed, 4 insertions(+), 10 deletions(-) > >diff --git a/Koha/ILL/Backend/Standard.pm b/Koha/ILL/Backend/Standard.pm >index 5962cd17653..2102cb73765 100644 >--- a/Koha/ILL/Backend/Standard.pm >+++ b/Koha/ILL/Backend/Standard.pm >@@ -145,19 +145,13 @@ that we do not consider to be metadata > > sub metadata { > my ( $self, $request ) = @_; >- my $attrs = $request->extended_attributes; >- my $metadata = {}; >- my @ignore = ( >- 'requested_partners', 'type', 'type_disclaimer_value', 'type_disclaimer_date', 'unauthenticated_first_name', >- 'unauthenticated_last_name', 'unauthenticated_email', 'historycheck_requests' >- ); >+ my $attrs = $request->extended_attributes->search( { backend => 'Standard' } ); >+ my $metadata = {}; > my $core_fields = _get_core_fields(); > while ( my $attr = $attrs->next ) { > my $type = $attr->type; >- if ( !grep { $_ eq $type } @ignore ) { >- my $name; >- $name = $core_fields->{$type} || ucfirst($type); >- $metadata->{$name} = $attr->value; >+ if ( $core_fields->{$type} ) { >+ $metadata->{ $core_fields->{$type} } = $attr->value; > } > } > return $metadata; >-- >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