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

(-)a/Koha/ILL/Requests.pm (-1 / +2 lines)
Lines 112-119 sub search_incomplete { Link Here
112
=cut
112
=cut
113
113
114
sub extended_attributes_config {
114
sub extended_attributes_config {
115
    my ( $self ) = @_;
115
    return {
116
    return {
116
        'id_field'     => 'illrequest_id',
117
        'id_field'     => { 'foreign' => 'illrequest_id', 'self' => 'illrequest_id' },
117
        'key_field'    => 'type',
118
        'key_field'    => 'type',
118
        'schema_class' => 'Koha::Schema::Result::Illrequestattribute',
119
        'schema_class' => 'Koha::Schema::Result::Illrequestattribute',
119
    };
120
    };
(-)a/Koha/Object/Mixin/AdditionalFields.pm (+2 lines)
Lines 4-9 use Modern::Perl; Link Here
4
use Koha::AdditionalFields;
4
use Koha::AdditionalFields;
5
use Koha::AdditionalFieldValues;
5
use Koha::AdditionalFieldValues;
6
6
7
use base qw(Koha::Objects::Mixin::ExtendedAttributes);
8
7
=head1 NAME
9
=head1 NAME
8
10
9
Koha::Object::Mixin::AdditionalFields
11
Koha::Object::Mixin::AdditionalFields
(-)a/Koha/Objects/Mixin/AdditionalFields.pm (+13 lines)
Lines 56-61 sub filter_by_additional_fields { Link Here
56
    return $class->search(\%conditions, { join => [ ('additional_field_values') x $idx ] });
56
    return $class->search(\%conditions, { join => [ ('additional_field_values') x $idx ] });
57
}
57
}
58
58
59
=head3 extended_attributes_config
60
61
=cut
62
63
sub extended_attributes_config {
64
    my ($self) = @_;
65
    return {
66
        'id_field'     => { 'foreign' => 'record_id', 'self' => $self->extended_attributes_record_id_field },
67
        'key_field'    => 'field_id',
68
        'schema_class' => 'Koha::Schema::Result::AdditionalFieldValue',
69
    };
70
}
71
59
=head1 AUTHOR
72
=head1 AUTHOR
60
73
61
Koha Development Team <http://koha-community.org/>
74
Koha Development Team <http://koha-community.org/>
(-)a/Koha/Objects/Mixin/ExtendedAttributes.pm (-2 / +2 lines)
Lines 49-56 sub _build_extended_attributes_relations { Link Here
49
                my $args = shift;
49
                my $args = shift;
50
50
51
                return {
51
                return {
52
                    "$args->{foreign_alias}.$ea_config->{id_field}" =>
52
                    "$args->{foreign_alias}.$ea_config->{id_field}->{foreign}" =>
53
                        { -ident => "$args->{self_alias}.$ea_config->{id_field}" },
53
                        { -ident => "$args->{self_alias}.$ea_config->{id_field}->{self}" },
54
                    "$args->{foreign_alias}.$ea_config->{key_field}" => { '=', $type },
54
                    "$args->{foreign_alias}.$ea_config->{key_field}" => { '=', $type },
55
                };
55
                };
56
            },
56
            },
(-)a/Koha/Patrons.pm (-1 / +2 lines)
Lines 571-578 sub filter_by_have_permission { Link Here
571
=cut
571
=cut
572
572
573
sub extended_attributes_config {
573
sub extended_attributes_config {
574
    my ( $self ) = @_;
574
    return {
575
    return {
575
        'id_field'     => 'borrowernumber',
576
        'id_field'     => { 'foreign' => 'borrowernumber', 'self' => 'borrowernumber' },
576
        'key_field'    => 'code',
577
        'key_field'    => 'code',
577
        'schema_class' => 'Koha::Schema::Result::BorrowerAttribute',
578
        'schema_class' => 'Koha::Schema::Result::BorrowerAttribute',
578
    };
579
    };
(-)a/Koha/Subscription.pm (-1 / +8 lines)
Lines 195-200 sub get_sharable_info { Link Here
195
}
195
}
196
196
197
197
198
=head3 extended_attributes_record_id_field
199
200
=cut
201
202
sub extended_attributes_record_id_field {
203
    return 'subscriptionid';
204
}
205
198
=head3 _type
206
=head3 _type
199
207
200
=cut
208
=cut
201
- 

Return to bug 37389