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

(-)a/C4/AuthoritiesMarc.pm (-3 / +3 lines)
Lines 1015-1022 sub BuildSummary { Link Here
1015
        use C4::Heading::MARC21;
1015
        use C4::Heading::MARC21;
1016
        my $handler = C4::Heading::MARC21->new();
1016
        my $handler = C4::Heading::MARC21->new();
1017
        my $subfields_to_report;
1017
        my $subfields_to_report;
1018
        my $subfields_to_subdivision = "";
1018
        my $delimiter = C4::Context->preference('AuthoritySeparator');
1019
        my $delimiter                = C4::Context->preference('AuthoritySeparator');
1020
1019
1021
        foreach my $field ($record->field('1..')) {
1020
        foreach my $field ($record->field('1..')) {
1022
            my $tag = $field->tag();
1021
            my $tag = $field->tag();
Lines 1095-1101 sub BuildSummary { Link Here
1095
            push @notes, { note => $field->as_string(), field => $field->tag() };
1094
            push @notes, { note => $field->as_string(), field => $field->tag() };
1096
        }
1095
        }
1097
1096
1098
     foreach my $field ( $record->field('7..') ) {
1097
    foreach my $field ( $record->field('7..') ) {
1098
        my $subfields_to_subdivision;
1099
        my $tag = $field->tag();
1099
        my $tag = $field->tag();
1100
1100
1101
        if ( $tag eq '700' ) {
1101
        if ( $tag eq '700' ) {
(-)a/t/db_dependent/AuthoritiesMarc.t (-8 / +20 lines)
Lines 41-48 $module->mock('GetAuthority', sub { Link Here
41
        $record->add_fields(
41
        $record->add_fields(
42
            [ '001', '2' ],
42
            [ '001', '2' ],
43
            [ '151', ' ', ' ', a => 'New York (State)' ],
43
            [ '151', ' ', ' ', a => 'New York (State)' ],
44
            [ '551', ' ', ' ', a => 'United States', w => 'g', 9 => '1' ]
44
            [ '551', ' ', ' ', a => 'United States', w => 'g',                   9 => '1' ],
45
            );
45
            [ '751', ' ', ' ', a => 'United States', w => 'g',                   9 => '1' ],
46
            [ '781', ' ', ' ', a => 'New York',      x => 'General subdivision', 9 => '1' ]
47
        );
46
    } elsif ($authid eq '3') {
48
    } elsif ($authid eq '3') {
47
        $record->add_fields(
49
        $record->add_fields(
48
            [ '001', '3' ],
50
            [ '001', '3' ],
Lines 151-164 my $expected_marc21_summary = { Link Here
151
            'type'    => 'broader'
153
            'type'    => 'broader'
152
        }
154
        }
153
    ],
155
    ],
154
    'seefrom'   => [],
156
    'equalterm' => [
155
    'label'     => 'Geographic Name',
157
        {
156
    'type'      => 'Geographic Name',
158
            'field'   => '751',
157
    'equalterm' => []
159
            'hemain'  => 'United States',
160
            'heading' => 'United States'
161
        },
162
        {
163
            'hemain'  => undef,
164
            'field'   => '781',
165
            'heading' => 'General subdivision'
166
        }
167
    ],
168
    'seefrom' => [],
169
    'label'   => 'Geographic Name',
170
    'type'    => 'Geographic Name',
158
};
171
};
159
172
160
is_deeply(
173
is_deeply(
161
    BuildSummary(C4::AuthoritiesMarc::GetAuthority(2), 2, 'GEOGR_NAME'),
174
    BuildSummary( C4::AuthoritiesMarc::GetAuthority(2), 2, 'GEOGR_NAME' ),
162
    $expected_marc21_summary,
175
    $expected_marc21_summary,
163
    'test BuildSummary for MARC21'
176
    'test BuildSummary for MARC21'
164
);
177
);
165
- 

Return to bug 35989