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

(-)a/t/db_dependent/Biblio.t (-8 / +64 lines)
Lines 17-23 Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Test::More tests => 7;
20
use Test::More tests => 9;
21
use Test::MockModule;
21
use Test::MockModule;
22
22
23
use List::MoreUtils qw( uniq );
23
use List::MoreUtils qw( uniq );
Lines 25-30 use MARC::Record; Link Here
25
use t::lib::Mocks qw( mock_preference );
25
use t::lib::Mocks qw( mock_preference );
26
26
27
use Koha::Database;
27
use Koha::Database;
28
use Koha::Caches;
29
use Koha::MarcSubfieldStructures;
28
30
29
BEGIN {
31
BEGIN {
30
    use_ok('C4::Biblio');
32
    use_ok('C4::Biblio');
Lines 33-41 BEGIN { Link Here
33
my $schema = Koha::Database->new->schema;
35
my $schema = Koha::Database->new->schema;
34
$schema->storage->txn_begin;
36
$schema->storage->txn_begin;
35
my $dbh = C4::Context->dbh;
37
my $dbh = C4::Context->dbh;
38
Koha::Caches->get_instance->clear_from_cache( "MarcSubfieldStructure-" );
36
39
37
subtest 'GetMarcSubfieldStructureFromKohaField' => sub {
40
subtest 'GetMarcSubfieldStructureFromKohaField' => sub {
38
    plan tests => 23;
41
    plan tests => 25;
39
42
40
    my @columns = qw(
43
    my @columns = qw(
41
        tagfield tagsubfield liblibrarian libopac repeatable mandatory kohafield tab
44
        tagfield tagsubfield liblibrarian libopac repeatable mandatory kohafield tab
Lines 54-64 subtest 'GetMarcSubfieldStructureFromKohaField' => sub { Link Here
54
    is($marc_subfield_structure->{kohafield}, 'biblio.biblionumber', "Result is the good result");
57
    is($marc_subfield_structure->{kohafield}, 'biblio.biblionumber', "Result is the good result");
55
    like($marc_subfield_structure->{tagfield}, qr/^\d{3}$/, "tagfield is a valid tagfield");
58
    like($marc_subfield_structure->{tagfield}, qr/^\d{3}$/, "tagfield is a valid tagfield");
56
59
60
    # Add a test for list context (BZ 10306)
61
    my @results = GetMarcSubfieldStructureFromKohaField('biblio.biblionumber', '');
62
    is( @results, 1, 'We expect only one mapping' );
63
    is_deeply( $results[0], $marc_subfield_structure,
64
        'The first entry should be the same hashref as we had before' );
65
57
    # foo.bar does not exist so this should return undef
66
    # foo.bar does not exist so this should return undef
58
    $marc_subfield_structure = GetMarcSubfieldStructureFromKohaField('foo.bar', '');
67
    $marc_subfield_structure = GetMarcSubfieldStructureFromKohaField('foo.bar', '');
59
    is($marc_subfield_structure, undef, "invalid kohafield returns undef");
68
    is($marc_subfield_structure, undef, "invalid kohafield returns undef");
69
60
};
70
};
61
71
72
subtest "GetMarcSubfieldStructure" => sub {
73
    plan tests => 5;
74
75
    # Add multiple Koha to Marc mappings
76
    my $mapping1 = Koha::MarcSubfieldStructures->find('','399','a') // Koha::MarcSubfieldStructure->new({ frameworkcode => '', tagfield => '399', tagsubfield => 'a' });
77
    $mapping1->kohafield( "mytable.nicepages" );
78
    $mapping1->store;
79
    my $mapping2 = Koha::MarcSubfieldStructures->find('','399','b') // Koha::MarcSubfieldStructure->new({ frameworkcode => '', tagfield => '399', tagsubfield => 'b' });
80
    $mapping2->kohafield( "mytable.nicepages" );
81
    $mapping2->store;
82
    Koha::Caches->get_instance->clear_from_cache( "MarcSubfieldStructure-" );
83
    my $structure = C4::Biblio::GetMarcSubfieldStructure('');
84
85
    is( @{ $structure->{"mytable.nicepages"} }, 2,
86
        'GetMarcSubfieldStructure should return two entries for nicepages' );
87
    is( $structure->{"mytable.nicepages"}->[0]->{tagfield}, '399',
88
        'Check tagfield for first entry' );
89
    is( $structure->{"mytable.nicepages"}->[0]->{tagsubfield}, 'a',
90
        'Check tagsubfield for first entry' );
91
    is( $structure->{"mytable.nicepages"}->[1]->{tagfield}, '399',
92
        'Check tagfield for second entry' );
93
    is( $structure->{"mytable.nicepages"}->[1]->{tagsubfield}, 'b',
94
        'Check tagsubfield for second entry' );
95
};
96
97
subtest "GetMarcFromKohaField" => sub {
98
    plan tests => 6;
99
100
    #NOTE: We are building on data from the previous subtest
101
    # With: field 399 / mytable.nicepages
102
103
    # Check call in list context for multiple mappings
104
    my @retval = C4::Biblio::GetMarcFromKohaField('mytable.nicepages', '');
105
    is( @retval, 4, 'Should return two tags and subfields' );
106
    is( $retval[0], '399', 'Check first tag' );
107
    is( $retval[1], 'a', 'Check first subfield' );
108
    is( $retval[2], '399', 'Check second tag' );
109
    is( $retval[3], 'b', 'Check second subfield' );
110
111
    # Check same call in scalar context
112
    is( C4::Biblio::GetMarcFromKohaField('mytable.nicepages', ''), '399',
113
        'GetMarcFromKohaField returns first tag in scalar context' );
114
};
62
115
63
# Mocking variables
116
# Mocking variables
64
my $biblio_module = new Test::MockModule('C4::Biblio');
117
my $biblio_module = new Test::MockModule('C4::Biblio');
Lines 75-86 $biblio_module->mock( Link Here
75
        my ( $itemnumber_field,       $itemnumber_subfield )       = get_itemnumber_field();
128
        my ( $itemnumber_field,       $itemnumber_subfield )       = get_itemnumber_field();
76
129
77
        return {
130
        return {
78
            'biblio.title'                 => { tagfield => $title_field,            tagsubfield => $title_subfield },
131
            'biblio.title'                 => [ { tagfield => $title_field,            tagsubfield => $title_subfield } ],
79
            'biblio.biblionumber'          => { tagfield => $biblionumber_field,     tagsubfield => $biblionumber_subfield },
132
            'biblio.biblionumber'          => [ { tagfield => $biblionumber_field,     tagsubfield => $biblionumber_subfield } ],
80
            'biblioitems.isbn'             => { tagfield => $isbn_field,             tagsubfield => $isbn_subfield },
133
            'biblioitems.isbn'             => [ { tagfield => $isbn_field,             tagsubfield => $isbn_subfield } ],
81
            'biblioitems.issn'             => { tagfield => $issn_field,             tagsubfield => $issn_subfield },
134
            'biblioitems.issn'             => [ { tagfield => $issn_field,             tagsubfield => $issn_subfield } ],
82
            'biblioitems.biblioitemnumber' => { tagfield => $biblioitemnumber_field, tagsubfield => $biblioitemnumber_subfield },
135
            'biblioitems.biblioitemnumber' => [ { tagfield => $biblioitemnumber_field, tagsubfield => $biblioitemnumber_subfield } ],
83
            'items.itemnumber'             => { tagfield => $itemnumber_subfield,    tagsubfield => $itemnumber_subfield },
136
            'items.itemnumber'             => [ { tagfield => $itemnumber_subfield,    tagsubfield => $itemnumber_subfield } ],
84
        };
137
        };
85
      }
138
      }
86
);
139
);
Lines 391-393 subtest 'deletedbiblio_metadata' => sub { Link Here
391
    is( $moved, $biblionumber, 'Found in deletedbiblio_metadata' );
444
    is( $moved, $biblionumber, 'Found in deletedbiblio_metadata' );
392
};
445
};
393
446
447
# Cleanup
448
Koha::Caches->get_instance->clear_from_cache( "MarcSubfieldStructure-" );
449
$schema->storage->txn_rollback;
(-)a/t/db_dependent/Biblio/TransformKohaToMarc.t (-1 / +75 lines)
Lines 1-8 Link Here
1
use Modern::Perl;
1
use Modern::Perl;
2
use Test::More tests => 1;
2
use Test::More tests => 4;
3
use MARC::Record;
3
use MARC::Record;
4
4
5
use t::lib::Mocks;
5
use t::lib::Mocks;
6
use t::lib::TestBuilder;
7
6
use Koha::Database;
8
use Koha::Database;
7
use Koha::Caches;
9
use Koha::Caches;
8
use Koha::MarcSubfieldStructures;
10
use Koha::MarcSubfieldStructures;
Lines 37-42 is_deeply( \@subfields, [ Link Here
37
        ],
39
        ],
38
'TransformKohaToMarc should return sorted subfields (regression test for bug 12343)' );
40
'TransformKohaToMarc should return sorted subfields (regression test for bug 12343)' );
39
41
42
43
# Now test multiple mappings per kohafield too
44
subtest "Multiple Koha to MARC mappings (BZ 10306)" => sub {
45
    plan tests => 4;
46
47
    # 300a and 260d mapped to mytable.nicepages
48
    my $mapping3 = Koha::MarcSubfieldStructures->find('','260','d') // Koha::MarcSubfieldStructure->new({ frameworkcode => '', tagfield => '260', tagsubfield => 'd' });
49
    $mapping3->kohafield( "mytable.nicepages" );
50
    $mapping3->store;
51
    Koha::Caches->get_instance->clear_from_cache( "MarcSubfieldStructure-" );
52
53
    # Include two values in goodillustrations too: should result in two
54
    # subfields.
55
    my $record = C4::Biblio::TransformKohaToMarc({
56
        "mytable2.goodillustrations" => "good | better",
57
        "mytable.nicepages"          => "nice",
58
    });
59
    is( $record->subfield('260','d'), "nice", "Check 260d" );
60
    is( $record->subfield('300','a'), "nice", "Check 300a" );
61
    is( $record->subfield('300','b'), "good", "Check first 300b" );
62
    is( ($record->field('300')->subfield('b'))[1], "better",
63
        "Check second 300b" );
64
};
65
66
subtest "Working with control fields in another framework" => sub {
67
    plan tests => 2;
68
69
    # Add a new framework
70
    my $fw = t::lib::TestBuilder->new->build_object({
71
        class => 'Koha::BiblioFrameworks'
72
    });
73
74
    # Map a controlfield to 'fullcontrol'
75
    my $mapping = Koha::MarcSubfieldStructure->new({ frameworkcode => $fw->frameworkcode, tagfield => '001', tagsubfield => '@', kohafield => 'fullcontrol' });
76
    $mapping->store;
77
78
    # First test in the wrong framework
79
    my @cols = ( notexist => 'i am not here', fullcontrol => 'all' );
80
    my $record = C4::Biblio::TransformKohaToMarc( { @cols } );
81
    is( $record->field('001'), undef,
82
        'With default framework we should not find a 001 controlfield' );
83
    # Now include the framework parameter and test 001
84
    $record = C4::Biblio::TransformKohaToMarc( { @cols }, $fw->frameworkcode );
85
    is( $record->field('001')->data, "all", "Check controlfield 001 with right frameworkcode" );
86
87
    # Remove from cache
88
    Koha::Caches->get_instance->clear_from_cache( "MarcSubfieldStructure-".$fw->frameworkcode );
89
};
90
91
subtest "Add test for no_split option" => sub {
92
    plan tests => 4;
93
94
    my $fwc = t::lib::TestBuilder->new->build({ source => 'MarcSubfieldStructure' })->{frameworkcode};
95
    Koha::MarcSubfieldStructure->new({ frameworkcode => $fwc, tagfield => '952', tagsubfield => 'a', kohafield => 'items.fld1' })->store;
96
    Koha::MarcSubfieldStructure->new({ frameworkcode => $fwc, tagfield => '952', tagsubfield => 'b', kohafield => 'items.fld1' })->store;
97
    Koha::Caches->get_instance->clear_from_cache( "MarcSubfieldStructure-$fwc" );
98
99
    # Test single value in fld1
100
    my @cols = ( 'items.fld1' => '01' );
101
    my $record = C4::Biblio::TransformKohaToMarc( { @cols }, $fwc, { no_split => 1 } );
102
    is( $record->subfield( '952', 'a' ), '01', 'Check single in 952a' );
103
    is( $record->subfield( '952', 'b' ), '01', 'Check single in 952b' );
104
105
    # Test glued (composite) value in fld1
106
    @cols = ( 'items.fld1' => '01 | 02' );
107
    $record = C4::Biblio::TransformKohaToMarc( { @cols }, $fwc, { no_split => 1 } );
108
    is( $record->subfield( '952', 'a' ), '01 | 02', 'Check composite in 952a' );
109
    is( $record->subfield( '952', 'b' ), '01 | 02', 'Check composite in 952b' );
110
111
    Koha::Caches->get_instance->clear_from_cache( "MarcSubfieldStructure-$fwc" );
112
};
113
40
# Cleanup
114
# Cleanup
41
Koha::Caches->get_instance->clear_from_cache( "MarcSubfieldStructure-" );
115
Koha::Caches->get_instance->clear_from_cache( "MarcSubfieldStructure-" );
42
$schema->storage->txn_rollback;
116
$schema->storage->txn_rollback;
(-)a/t/db_dependent/Biblio/TransformMarcToKoha.t (+89 lines)
Line 0 Link Here
1
#!/usr/bin/perl
2
3
# Tests for C4::Biblio::TransformMarcToKoha, TransformMarcToKohaOneField
4
5
# Copyright 2017 Rijksmuseum
6
#
7
# This file is part of Koha.
8
#
9
# Koha is free software; you can redistribute it and/or modify it under the
10
# terms of the GNU General Public License as published by the Free Software
11
# Foundation; either version 3 of the License, or (at your option) any later
12
# version.
13
#
14
# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
15
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
16
# A PARTICULAR PURPOSE. See the GNU General Public License for more details.
17
#
18
# You should have received a copy of the GNU General Public License along
19
# with Koha; if not, see <http://www.gnu.org/licenses>.
20
21
use Modern::Perl;
22
use Test::More tests => 2;
23
use MARC::Record;
24
25
use t::lib::Mocks;
26
use t::lib::TestBuilder;
27
28
use Koha::Database;
29
use Koha::Caches;
30
use Koha::MarcSubfieldStructures;
31
use C4::Biblio;
32
33
my $schema  = Koha::Database->new->schema;
34
$schema->storage->txn_begin;
35
36
# Create a new framework with a few mappings
37
# Note: TransformMarcToKoha wants a table name (biblio, biblioitems or items)
38
our $fwc = t::lib::TestBuilder->new->build_object({ class => 'Koha::BiblioFrameworks' })->frameworkcode;
39
Koha::MarcSubfieldStructure->new({ frameworkcode => $fwc, tagfield => '300', tagsubfield => 'a', kohafield => 'biblio.field1' })->store;
40
Koha::MarcSubfieldStructure->new({ frameworkcode => $fwc, tagfield => '300', tagsubfield => 'b', kohafield => 'biblio.field2' })->store;
41
Koha::MarcSubfieldStructure->new({ frameworkcode => $fwc, tagfield => '500', tagsubfield => 'a', kohafield => 'biblio.field3' })->store;
42
43
subtest 'Test a few mappings' => sub {
44
    plan tests => 6;
45
46
    my $marc = MARC::Record->new;
47
    $marc->append_fields(
48
        MARC::Field->new( '300', '', '', a => 'a1', b => 'b1' ),
49
        MARC::Field->new( '300', '', '', a => 'a2', b => 'b2' ),
50
        MARC::Field->new( '500', '', '', a => 'note1', a => 'note2' ),
51
    );
52
    my $result = C4::Biblio::TransformMarcToKoha( $marc, $fwc );
53
        # Note: TransformMarcToKoha stripped the table prefix biblio.
54
    is( keys %{$result}, 3, 'Found all three mappings' );
55
    is( $result->{field1}, 'a1 | a2', 'Check field1 results' );
56
    is( $result->{field2}, 'b1 | b2', 'Check field2 results' );
57
    is( $result->{field3}, 'note1 | note2', 'Check field3 results' );
58
59
    is( C4::Biblio::TransformMarcToKohaOneField( 'biblio.field1', $marc, $fwc ),
60
        $result->{field1}, 'TransformMarcToKohaOneField returns biblio.field1');
61
    is( C4::Biblio::TransformMarcToKohaOneField( 'field4', $marc, $fwc ),
62
        undef, 'TransformMarcToKohaOneField returns undef' );
63
};
64
65
subtest 'Multiple mappings for one kohafield' => sub {
66
    plan tests => 4;
67
68
    # Add another mapping to field1
69
    Koha::MarcSubfieldStructure->new({ frameworkcode => $fwc, tagfield => '510', tagsubfield => 'a', kohafield => 'biblio.field1' })->store;
70
    Koha::Caches->get_instance->clear_from_cache( "MarcSubfieldStructure-$fwc" );
71
72
    my $marc = MARC::Record->new;
73
    $marc->append_fields( MARC::Field->new( '300', '', '', a => '3a' ) );
74
    my $result = C4::Biblio::TransformMarcToKoha( $marc, $fwc );
75
    is_deeply( $result, { field1 => '3a' }, 'Simple start' );
76
    $marc->append_fields( MARC::Field->new( '510', '', '', a => '' ) );
77
    $result = C4::Biblio::TransformMarcToKoha( $marc, $fwc );
78
    is_deeply( $result, { field1 => '3a' }, 'An empty 510a makes no difference' );
79
    $marc->append_fields( MARC::Field->new( '510', '', '', a => '51' ) );
80
    $result = C4::Biblio::TransformMarcToKoha( $marc, $fwc );
81
    is_deeply( $result, { field1 => '3a | 51' }, 'Got 300a and 510a' );
82
83
    is( C4::Biblio::TransformMarcToKohaOneField( 'biblio.field1', $marc, $fwc ),
84
        '3a | 51', 'TransformMarcToKohaOneField returns biblio.field1' );
85
};
86
87
# Cleanup
88
Koha::Caches->get_instance->clear_from_cache( "MarcSubfieldStructure-$fwc" );
89
$schema->storage->txn_rollback;
(-)a/t/db_dependent/Search.t (-39 / +38 lines)
Lines 159-202 sub mock_GetMarcSubfieldStructure { Link Here
159
    if ($marc_type eq 'marc21') {
159
    if ($marc_type eq 'marc21') {
160
        $bibliomodule->mock('GetMarcSubfieldStructure', sub {
160
        $bibliomodule->mock('GetMarcSubfieldStructure', sub {
161
            return {
161
            return {
162
                    'biblio.biblionumber' => { tagfield =>  '999', tagsubfield => 'c' },
162
                    'biblio.biblionumber' => [{ tagfield =>  '999', tagsubfield => 'c' }],
163
                    'biblio.isbn' => { tagfield => '020', tagsubfield => 'a' },
163
                    'biblio.isbn' => [{ tagfield => '020', tagsubfield => 'a' }],
164
                    'biblio.title' => { tagfield => '245', tagsubfield => 'a' },
164
                    'biblio.title' => [{ tagfield => '245', tagsubfield => 'a' }],
165
                    'biblio.notes' => { tagfield => '500', tagsubfield => 'a' },
165
                    'biblio.notes' => [{ tagfield => '500', tagsubfield => 'a' }],
166
                    'items.barcode' => { tagfield => '952', tagsubfield => 'p' },
166
                    'items.barcode' => [{ tagfield => '952', tagsubfield => 'p' }],
167
                    'items.booksellerid' => { tagfield => '952', tagsubfield => 'e' },
167
                    'items.booksellerid' => [{ tagfield => '952', tagsubfield => 'e' }],
168
                    'items.ccode' => { tagfield => '952', tagsubfield => '8' },
168
                    'items.ccode' => [{ tagfield => '952', tagsubfield => '8' }],
169
                    'items.cn_sort' => { tagfield => '952', tagsubfield => '6' },
169
                    'items.cn_sort' => [{ tagfield => '952', tagsubfield => '6' }],
170
                    'items.cn_source' => { tagfield => '952', tagsubfield => '2' },
170
                    'items.cn_source' => [{ tagfield => '952', tagsubfield => '2' }],
171
                    'items.coded_location_qualifier' => { tagfield => '952', tagsubfield => 'f' },
171
                    'items.coded_location_qualifier' => [{ tagfield => '952', tagsubfield => 'f' }],
172
                    'items.copynumber' => { tagfield => '952', tagsubfield => 't' },
172
                    'items.copynumber' => [{ tagfield => '952', tagsubfield => 't' }],
173
                    'items.damaged' => { tagfield => '952', tagsubfield => '4' },
173
                    'items.damaged' => [{ tagfield => '952', tagsubfield => '4' }],
174
                    'items.dateaccessioned' => { tagfield => '952', tagsubfield => 'd' },
174
                    'items.dateaccessioned' => [{ tagfield => '952', tagsubfield => 'd' }],
175
                    'items.datelastborrowed' => { tagfield => '952', tagsubfield => 's' },
175
                    'items.datelastborrowed' => [{ tagfield => '952', tagsubfield => 's' }],
176
                    'items.datelastseen' => { tagfield => '952', tagsubfield => 'r' },
176
                    'items.datelastseen' => [{ tagfield => '952', tagsubfield => 'r' }],
177
                    'items.enumchron' => { tagfield => '952', tagsubfield => 'h' },
177
                    'items.enumchron' => [{ tagfield => '952', tagsubfield => 'h' }],
178
                    'items.holdingbranch' => { tagfield => '952', tagsubfield => 'b' },
178
                    'items.holdingbranch' => [{ tagfield => '952', tagsubfield => 'b' }],
179
                    'items.homebranch' => { tagfield => '952', tagsubfield => 'a' },
179
                    'items.homebranch' => [{ tagfield => '952', tagsubfield => 'a' }],
180
                    'items.issues' => { tagfield => '952', tagsubfield => 'l' },
180
                    'items.issues' => [{ tagfield => '952', tagsubfield => 'l' }],
181
                    'items.itemcallnumber' => { tagfield => '952', tagsubfield => 'o' },
181
                    'items.itemcallnumber' => [{ tagfield => '952', tagsubfield => 'o' }],
182
                    'items.itemlost' => { tagfield => '952', tagsubfield => '1' },
182
                    'items.itemlost' => [{ tagfield => '952', tagsubfield => '1' }],
183
                    'items.itemnotes' => { tagfield => '952', tagsubfield => 'z' },
183
                    'items.itemnotes' => [{ tagfield => '952', tagsubfield => 'z' }],
184
                    'items.itemnumber' => { tagfield => '952', tagsubfield => '9' },
184
                    'items.itemnumber' => [{ tagfield => '952', tagsubfield => '9' }],
185
                    'items.itype' => { tagfield => '952', tagsubfield => 'y' },
185
                    'items.itype' => [{ tagfield => '952', tagsubfield => 'y' }],
186
                    'items.location' => { tagfield => '952', tagsubfield => 'c' },
186
                    'items.location' => [{ tagfield => '952', tagsubfield => 'c' }],
187
                    'items.materials' => { tagfield => '952', tagsubfield => '3' },
187
                    'items.materials' => [{ tagfield => '952', tagsubfield => '3' }],
188
                    'items.nonpublicnote' => { tagfield => '952', tagsubfield => 'x' },
188
                    'items.nonpublicnote' => [{ tagfield => '952', tagsubfield => 'x' }],
189
                    'items.notforloan' => { tagfield => '952', tagsubfield => '7' },
189
                    'items.notforloan' => [{ tagfield => '952', tagsubfield => '7' }],
190
                    'items.onloan' => { tagfield => '952', tagsubfield => 'q' },
190
                    'items.onloan' => [{ tagfield => '952', tagsubfield => 'q' }],
191
                    'items.price' => { tagfield => '952', tagsubfield => 'g' },
191
                    'items.price' => [{ tagfield => '952', tagsubfield => 'g' }],
192
                    'items.renewals' => { tagfield => '952', tagsubfield => 'm' },
192
                    'items.renewals' => [{ tagfield => '952', tagsubfield => 'm' }],
193
                    'items.replacementprice' => { tagfield => '952', tagsubfield => 'v' },
193
                    'items.replacementprice' => [{ tagfield => '952', tagsubfield => 'v' }],
194
                    'items.replacementpricedate' => { tagfield => '952', tagsubfield => 'w' },
194
                    'items.replacementpricedate' => [{ tagfield => '952', tagsubfield => 'w' }],
195
                    'items.reserves' => { tagfield => '952', tagsubfield => 'n' },
195
                    'items.reserves' => [{ tagfield => '952', tagsubfield => 'n' }],
196
                    'items.restricted' => { tagfield => '952', tagsubfield => '5' },
196
                    'items.restricted' => [{ tagfield => '952', tagsubfield => '5' }],
197
                    'items.stack' => { tagfield => '952', tagsubfield => 'j' },
197
                    'items.stack' => [{ tagfield => '952', tagsubfield => 'j' }],
198
                    'items.uri' => { tagfield => '952', tagsubfield => 'u' },
198
                    'items.uri' => [{ tagfield => '952', tagsubfield => 'u' }],
199
                    'items.withdrawn' => { tagfield => '952', tagsubfield => '0' },
199
                    'items.withdrawn' => [{ tagfield => '952', tagsubfield => '0' }],
200
                };
200
                };
201
        });
201
        });
202
    }
202
    }
203
- 

Return to bug 10306