View | Details | Raw Unified | Return to bug 40856
Collapse All | Expand All

(-)a/Koha/ILL/Backend/Standard.pm (-9 / +11 lines)
Lines 145-165 that we do not consider to be metadata Link Here
145
145
146
sub metadata {
146
sub metadata {
147
    my ( $self, $request ) = @_;
147
    my ( $self, $request ) = @_;
148
    my $attrs    = $request->extended_attributes;
148
149
    my $metadata = {};
149
    my @ignore = (
150
    my @ignore   = (
151
        'requested_partners', 'type', 'type_disclaimer_value', 'type_disclaimer_date', 'unauthenticated_first_name',
150
        'requested_partners', 'type', 'type_disclaimer_value', 'type_disclaimer_date', 'unauthenticated_first_name',
152
        'unauthenticated_last_name', 'unauthenticated_email', 'historycheck_requests', 'copyrightclearance_confirmed'
151
        'unauthenticated_last_name', 'unauthenticated_email', 'historycheck_requests', 'copyrightclearance_confirmed'
153
    );
152
    );
153
154
    # Use database-level filtering instead of manual iteration
155
    my $attrs = $request->extended_attributes->search( { type => { '-not_in' => \@ignore } } );
156
154
    my $core_fields = _get_core_fields();
157
    my $core_fields = _get_core_fields();
158
    my $metadata    = {};
159
155
    while ( my $attr = $attrs->next ) {
160
    while ( my $attr = $attrs->next ) {
156
        my $type = $attr->type;
161
        my $type = $attr->type;
157
        if ( !grep { $_ eq $type } @ignore ) {
162
        my $name = $core_fields->{$type} || ucfirst($type);
158
            my $name;
163
        $metadata->{$name} = $attr->value;
159
            $name = $core_fields->{$type} || ucfirst($type);
160
            $metadata->{$name} = $attr->value;
161
        }
162
    }
164
    }
165
163
    return $metadata;
166
    return $metadata;
164
}
167
}
165
168
166
- 

Return to bug 40856