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

(-)a/C4/AuthoritiesMarc.pm (-3 / +3 lines)
Lines 1009-1017 sub BuildSummary { Link Here
1009
        } } $record->field('7..');
1009
        } } $record->field('7..');
1010
1010
1011
    } else {
1011
    } else {
1012
# construct MARC21 summary
1012
        # construct MARC21 summary
1013
# FIXME - looping over 1XX is questionable
1013
        # FIXME - looping over 1XX is questionable
1014
# since MARC21 authority should have only one 1XX
1014
        # since MARC21 authority should have only one 1XX
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;
(-)a/t/db_dependent/AuthoritiesMarc.t (-34 / +37 lines)
Lines 29-72 $module->mock('GetHeaderAuthority', sub { Link Here
29
$module->mock('AddAuthorityTrees', sub {
29
$module->mock('AddAuthorityTrees', sub {
30
    return;
30
    return;
31
});
31
});
32
$module->mock('GetAuthority', sub {
32
$module->mock(
33
    my ($authid) = @_;
33
    'GetAuthority',
34
    my $record = MARC::Record->new();
34
    sub {
35
    if ($authid eq '1') {
35
        my ($authid) = @_;
36
        $record->add_fields(
36
        my $record = MARC::Record->new();
37
            [ '001', '1' ],
37
        if ( $authid eq '1' ) {
38
            [ '151', ' ', ' ', a => 'United States' ]
38
            $record->add_fields(
39
                [ '001', '1' ],
40
                [ '151', ' ', ' ', a => 'United States' ]
41
            );
42
        } elsif ( $authid eq '2' ) {
43
            $record->add_fields(
44
                [ '001', '2' ],
45
                [ '151', ' ', ' ', a => 'New York (State)' ],
46
                [ '551', ' ', ' ', a => 'United States', w => 'g',                   9 => '1' ],
47
                [ '751', ' ', ' ', a => 'United States', w => 'g',                   9 => '1' ],
48
                [ '781', ' ', ' ', a => 'New York',      x => 'General subdivision', 9 => '1' ]
39
            );
49
            );
40
    } elsif ($authid eq '2') {
50
        } elsif ( $authid eq '3' ) {
41
        $record->add_fields(
51
            $record->add_fields(
42
            [ '001', '2' ],
52
                [ '001', '3' ],
43
            [ '151', ' ', ' ', a => 'New York (State)' ],
53
                [ '151', ' ', ' ', a => 'New York (City)' ],
44
            [ '551', ' ', ' ', a => 'United States', w => 'g',                   9 => '1' ],
54
                [ '551', ' ', ' ', a => 'New York (State)', w => 'g', 9 => '2' ]
45
            [ '751', ' ', ' ', a => 'United States', w => 'g',                   9 => '1' ],
46
            [ '781', ' ', ' ', a => 'New York',      x => 'General subdivision', 9 => '1' ]
47
        );
48
    } elsif ($authid eq '3') {
49
        $record->add_fields(
50
            [ '001', '3' ],
51
            [ '151', ' ', ' ', a => 'New York (City)' ],
52
            [ '551', ' ', ' ', a => 'New York (State)', w => 'g', 9 => '2' ]
53
            );
55
            );
54
    } elsif ($authid eq '4') {
56
        } elsif ( $authid eq '4' ) {
55
        $record->add_fields(
57
            $record->add_fields(
56
            [ '001', '4' ],
58
                [ '001', '4' ],
57
            [ '151', ' ', ' ', a => 'New York (City)' ],
59
                [ '151', ' ', ' ', a => 'New York (City)' ],
58
            [ '551', ' ', ' ', a => 'New York (State)', w => 'g' ]
60
                [ '551', ' ', ' ', a => 'New York (State)', w => 'g' ]
59
            );
61
            );
60
    } elsif ($authid eq '5') {
62
        } elsif ( $authid eq '5' ) {
61
        $record->add_fields(
63
            $record->add_fields(
62
            [ '001', '5' ],
64
                [ '001', '5' ],
63
            [ '100', ' ', ' ', a => 'Lastname, Firstname', b => 'b', c => 'c', i => 'i' ]
65
                [ '100', ' ', ' ', a => 'Lastname, Firstname', b => 'b', c => 'c', i => 'i' ]
64
            );
66
            );
65
    } else {
67
        } else {
66
        undef $record;
68
            undef $record;
69
        }
70
        return $record;
67
    }
71
    }
68
    return $record;
72
);
69
});
73
70
74
71
my $schema  = Koha::Database->new->schema;
75
my $schema  = Koha::Database->new->schema;
72
$schema->storage->txn_begin;
76
$schema->storage->txn_begin;
73
- 

Return to bug 35989