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

(-)a/C4/Koha.pm (-2 / +8 lines)
Lines 349-362 sub getFacets { Link Here
349
                sep   => ', ',
349
                sep   => ', ',
350
            },
350
            },
351
            {
351
            {
352
                idx   => 'location',
352
                idx   => 'itype',
353
                label => 'Item types',
354
                tags  => [ qw/ 995r 942c /],
355
                sep   => ', ',
356
            },
357
            {
358
                idx  => 'location',
353
                label => 'Location',
359
                label => 'Location',
354
                tags  => [qw/ 995e /],
360
                tags  => [qw/ 995e /],
355
            },
361
            },
356
            {
362
            {
357
                idx   => 'ccode',
363
                idx   => 'ccode',
358
                label => 'Collections',
364
                label => 'Collections',
359
                tags  => [qw / 099t 955h /],
365
                tags => [ qw / 995h /],
360
            }
366
            }
361
        ];
367
        ];
362
368
(-)a/admin/searchengine/elasticsearch/mappings.yaml (-2 / +12 lines)
Lines 1351-1357 biblios: Link Here
1351
      sort: 1
1351
      sort: 1
1352
      suggestible: ''
1352
      suggestible: ''
1353
    - facet: 1
1353
    - facet: 1
1354
      marc_field: '9958'
1354
      marc_field: '995h'
1355
      marc_type: unimarc
1355
      marc_type: unimarc
1356
      sort: 1
1356
      sort: 1
1357
      suggestible: ''
1357
      suggestible: ''
Lines 2255-2260 biblios: Link Here
2255
      marc_type: marc21
2255
      marc_type: marc21
2256
      sort: 1
2256
      sort: 1
2257
      suggestible: ''
2257
      suggestible: ''
2258
    - facet: ''
2259
      marc_field: 942c
2260
      marc_type: unimarc
2261
      sort: 1
2262
      suggestible: ''
2258
    opac: 1
2263
    opac: 1
2259
    staff_client: 1
2264
    staff_client: 1
2260
    type: ''
2265
    type: ''
Lines 2274-2280 biblios: Link Here
2274
      sort: 1
2279
      sort: 1
2275
      suggestible: ''
2280
      suggestible: ''
2276
    - facet: 1
2281
    - facet: 1
2277
      marc_field: 200b
2282
      marc_field: 942c
2278
      marc_type: unimarc
2283
      marc_type: unimarc
2279
      sort: 1
2284
      sort: 1
2280
      suggestible: ''
2285
      suggestible: ''
Lines 4403-4408 biblios: Link Here
4403
      marc_type: marc21
4408
      marc_type: marc21
4404
      sort: 1
4409
      sort: 1
4405
      suggestible: ''
4410
      suggestible: ''
4411
    - facet: ''
4412
      marc_field: '9420'
4413
      marc_type: unimarc
4414
      sort: 1
4415
      suggestible: ''
4406
    opac: 1
4416
    opac: 1
4407
    staff_client: 1
4417
    staff_client: 1
4408
    type: ''
4418
    type: ''
(-)a/etc/zebradb/marc_defs/unimarc/biblios/biblio-koha-indexdefs.xml (-18 / +13 lines)
Lines 39-48 Link Here
39
    <target_index>Date/time-last-modified:n</target_index>
39
    <target_index>Date/time-last-modified:n</target_index>
40
    <target_index>Date/time-last-modified:y</target_index>
40
    <target_index>Date/time-last-modified:y</target_index>
41
  </index_subfields>
41
  </index_subfields>
42
  <!--record.abs line 30: melm 099$t      ccode:w-->
43
  <index_subfields tag="099" subfields="t">
44
    <target_index>ccode:w</target_index>
45
  </index_subfields>
46
  <!--010 : ISBN-->
42
  <!--010 : ISBN-->
47
  <index_subfields tag="010" subfields="az">
43
  <index_subfields tag="010" subfields="az">
48
    <target_index>ISBN:w</target_index>
44
    <target_index>ISBN:w</target_index>
Lines 103-117 Link Here
103
    <target_index>EAN:w</target_index>
99
    <target_index>EAN:w</target_index>
104
    <target_index>Identifier-standard:w</target_index>
100
    <target_index>Identifier-standard:w</target_index>
105
  </index_subfields>
101
  </index_subfields>
106
  <!--record.abs melm 200$b      itemtype:w,itemtype:p,itype:w,itype:p,Material-type:w,Material-type:p-->
107
  <index_subfields tag="200" subfields="b">
108
    <target_index>itemtype:w</target_index>
109
    <target_index>itemtype:p</target_index>
110
    <target_index>itype:w</target_index>
111
    <target_index>itype:p</target_index>
112
    <target_index>Material-type:w</target_index>
113
    <target_index>Material-type:p</target_index>
114
  </index_subfields>
115
  <!--record.abs line 87: melm 995$r      itemtype:w,itemtype:p,itype:w,itype:p-->
102
  <!--record.abs line 87: melm 995$r      itemtype:w,itemtype:p,itype:w,itype:p-->
116
  <index_subfields tag="995" subfields="r">
103
  <index_subfields tag="995" subfields="r">
117
    <target_index>itemtype:w</target_index>
104
    <target_index>itemtype:w</target_index>
Lines 1446-1457 Link Here
1446
    <target_index>totalissues:n</target_index>
1433
    <target_index>totalissues:n</target_index>
1447
    <target_index>totalissues:s</target_index>
1434
    <target_index>totalissues:s</target_index>
1448
  </index_subfields>
1435
  </index_subfields>
1436
  <index_subfields tag="942" subfields="c">
1437
    <target_index>itemtype:w</target_index>
1438
    <target_index>itemtype:p</target_index>
1439
    <target_index>itype:w</target_index>
1440
    <target_index>itype:p</target_index>
1441
  </index_subfields>
1449
  <index_subfields tag="999" subfields="x">
1442
  <index_subfields tag="999" subfields="x">
1450
    <target_index>not-onloan-count:n</target_index>
1443
    <target_index>not-onloan-count:n</target_index>
1451
  </index_subfields>
1444
  </index_subfields>
1452
  <facet tag="099" subfields="t">
1453
    <target_index>ccode:0</target_index>
1454
  </facet>
1455
  <facet tag="225" subfields="a">
1445
  <facet tag="225" subfields="a">
1456
    <target_index>se:0</target_index>
1446
    <target_index>se:0</target_index>
1457
  </facet>
1447
  </facet>
Lines 1488-1493 Link Here
1488
  <facet tag="702" subfields="ab">
1478
  <facet tag="702" subfields="ab">
1489
    <target_index>au:0</target_index>
1479
    <target_index>au:0</target_index>
1490
  </facet>
1480
  </facet>
1481
  <facet tag="942" subfields="c">
1482
    <target_index>itype:0</target_index>
1483
  </facet>
1491
  <facet tag="995" subfields="b">
1484
  <facet tag="995" subfields="b">
1492
    <target_index>homebranch:0</target_index>
1485
    <target_index>homebranch:0</target_index>
1493
  </facet>
1486
  </facet>
Lines 1500-1504 Link Here
1500
  <facet tag="995" subfields="h">
1493
  <facet tag="995" subfields="h">
1501
    <target_index>ccode:0</target_index>
1494
    <target_index>ccode:0</target_index>
1502
  </facet>
1495
  </facet>
1503
1496
  <facet tag="995" subfields="r">
1504
</kohaidx:index_defs>
1497
    <target_index>itype:0</target_index>
1498
  </facet>
1499
  </kohaidx:index_defs>
(-)a/etc/zebradb/marc_defs/unimarc/biblios/biblio-zebra-indexdefs.xsl (-44 / +40 lines)
Lines 87-99 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
87
        </z:index>
87
        </z:index>
88
      </xslo:if>
88
      </xslo:if>
89
    </xslo:for-each>
89
    </xslo:for-each>
90
    <xslo:for-each select="marc:subfield">
91
      <xslo:if test="contains('t', @code)">
92
        <z:index name="ccode:w">
93
          <xslo:value-of select="."/>
94
        </z:index>
95
      </xslo:if>
96
    </xslo:for-each>
97
  </xslo:template>
90
  </xslo:template>
98
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='010']">
91
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='010']">
99
    <xslo:for-each select="marc:subfield">
92
    <xslo:for-each select="marc:subfield">
Lines 217-252 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
217
      </xslo:if>
210
      </xslo:if>
218
    </xslo:for-each>
211
    </xslo:for-each>
219
  </xslo:template>
212
  </xslo:template>
220
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='200']">
221
    <xslo:for-each select="marc:subfield">
222
      <xslo:if test="contains('b', @code)">
223
        <z:index name="itemtype:w itemtype:p itype:w itype:p Material-type:w Material-type:p">
224
          <xslo:value-of select="."/>
225
        </z:index>
226
      </xslo:if>
227
    </xslo:for-each>
228
    <xslo:for-each select="marc:subfield">
229
      <xslo:if test="contains('fg', @code)">
230
        <z:index name="Author:w Author:p">
231
          <xslo:value-of select="."/>
232
        </z:index>
233
      </xslo:if>
234
    </xslo:for-each>
235
    <xslo:for-each select="marc:subfield">
236
      <xslo:if test="contains('aei', @code)">
237
        <z:index name="Title:w Title:p Title:s Title-cover:w Title-cover:p Title-cover:s">
238
          <xslo:value-of select="."/>
239
        </z:index>
240
      </xslo:if>
241
    </xslo:for-each>
242
    <xslo:for-each select="marc:subfield">
243
      <xslo:if test="contains('cd', @code)">
244
        <z:index name="Title:w Title:p">
245
          <xslo:value-of select="."/>
246
        </z:index>
247
      </xslo:if>
248
    </xslo:for-each>
249
  </xslo:template>
250
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='995']">
213
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='995']">
251
    <xslo:for-each select="marc:subfield">
214
    <xslo:for-each select="marc:subfield">
252
      <xslo:if test="contains('r', @code)">
215
      <xslo:if test="contains('r', @code)">
Lines 643-648 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
643
      </xslo:if>
606
      </xslo:if>
644
    </xslo:for-each>
607
    </xslo:for-each>
645
  </xslo:template>
608
  </xslo:template>
609
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='200']">
610
    <xslo:for-each select="marc:subfield">
611
      <xslo:if test="contains('fg', @code)">
612
        <z:index name="Author:w Author:p">
613
          <xslo:value-of select="."/>
614
        </z:index>
615
      </xslo:if>
616
    </xslo:for-each>
617
    <xslo:for-each select="marc:subfield">
618
      <xslo:if test="contains('aei', @code)">
619
        <z:index name="Title:w Title:p Title:s Title-cover:w Title-cover:p Title-cover:s">
620
          <xslo:value-of select="."/>
621
        </z:index>
622
      </xslo:if>
623
    </xslo:for-each>
624
    <xslo:for-each select="marc:subfield">
625
      <xslo:if test="contains('cd', @code)">
626
        <z:index name="Title:w Title:p">
627
          <xslo:value-of select="."/>
628
        </z:index>
629
      </xslo:if>
630
    </xslo:for-each>
631
  </xslo:template>
646
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='700']">
632
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='700']">
647
    <xslo:for-each select="marc:subfield">
633
    <xslo:for-each select="marc:subfield">
648
      <xslo:if test="contains('3', @code)">
634
      <xslo:if test="contains('3', @code)">
Lines 1882-1887 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
1882
        </z:index>
1868
        </z:index>
1883
      </xslo:if>
1869
      </xslo:if>
1884
    </xslo:for-each>
1870
    </xslo:for-each>
1871
    <xslo:for-each select="marc:subfield">
1872
      <xslo:if test="contains('c', @code)">
1873
        <z:index name="itemtype:w itemtype:p itype:w itype:p">
1874
          <xslo:value-of select="."/>
1875
        </z:index>
1876
      </xslo:if>
1877
    </xslo:for-each>
1885
  </xslo:template>
1878
  </xslo:template>
1886
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='999']">
1879
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='999']">
1887
    <xslo:for-each select="marc:subfield">
1880
    <xslo:for-each select="marc:subfield">
Lines 2542-2554 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
2542
      <xslo:value-of select="normalize-space($raw_heading)"/>
2535
      <xslo:value-of select="normalize-space($raw_heading)"/>
2543
    </z:index>
2536
    </z:index>
2544
  </xslo:template>
2537
  </xslo:template>
2545
  <xslo:template mode="index_facets" match="marc:datafield[@tag='099']">
2546
    <xslo:if test="not(@ind1='z')">
2547
      <z:index name="ccode:0">
2548
        <xslo:value-of select="marc:subfield[@code='t']"/>
2549
      </z:index>
2550
    </xslo:if>
2551
  </xslo:template>
2552
  <xslo:template mode="index_facets" match="marc:datafield[@tag='225']">
2538
  <xslo:template mode="index_facets" match="marc:datafield[@tag='225']">
2553
    <xslo:if test="not(@ind1='z')">
2539
    <xslo:if test="not(@ind1='z')">
2554
      <z:index name="se:0">
2540
      <z:index name="se:0">
Lines 2661-2666 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
2661
      </z:index>
2647
      </z:index>
2662
    </xslo:if>
2648
    </xslo:if>
2663
  </xslo:template>
2649
  </xslo:template>
2650
  <xslo:template mode="index_facets" match="marc:datafield[@tag='942']">
2651
    <xslo:if test="not(@ind1='z')">
2652
      <z:index name="itype:0">
2653
        <xslo:value-of select="marc:subfield[@code='c']"/>
2654
      </z:index>
2655
    </xslo:if>
2656
  </xslo:template>
2664
  <xslo:template mode="index_facets" match="marc:datafield[@tag='995']">
2657
  <xslo:template mode="index_facets" match="marc:datafield[@tag='995']">
2665
    <xslo:if test="not(@ind1='z')">
2658
    <xslo:if test="not(@ind1='z')">
2666
      <z:index name="homebranch:0">
2659
      <z:index name="homebranch:0">
Lines 2675-2680 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
2675
      <z:index name="ccode:0">
2668
      <z:index name="ccode:0">
2676
        <xslo:value-of select="marc:subfield[@code='h']"/>
2669
        <xslo:value-of select="marc:subfield[@code='h']"/>
2677
      </z:index>
2670
      </z:index>
2671
      <z:index name="itype:0">
2672
        <xslo:value-of select="marc:subfield[@code='r']"/>
2673
      </z:index>
2678
    </xslo:if>
2674
    </xslo:if>
2679
  </xslo:template>
2675
  </xslo:template>
2680
  <xslo:template mode="index_all" match="text()">
2676
  <xslo:template mode="index_all" match="text()">
(-)a/installer/data/mysql/en/marcflavour/unimarc/mandatory/unimarc_framework_DEFAULT.yml (-57 / +3 lines)
Lines 423-430 tables: Link Here
423
      multiline: []
423
      multiline: []
424
      rows:
424
      rows:
425
        - tagfield: "099"
425
        - tagfield: "099"
426
          liblibrarian: "local dates"
426
          liblibrarian: "Local dates (Koha)"
427
          libopac: ""
427
          libopac: "Local dates (Koha)"
428
          repeatable: 0
428
          repeatable: 0
429
          mandatory: 0
429
          mandatory: 0
430
          authorised_value:
430
          authorised_value:
Lines 470-529 tables: Link Here
470
          link: ""
470
          link: ""
471
          defaultvalue:
471
          defaultvalue:
472
472
473
        - tagfield: "099"
474
          tagsubfield: "s"
475
          liblibrarian: "Serial"
476
          libopac: "Serial"
477
          repeatable: 0
478
          mandatory: 0
479
          kohafield: biblio.serial
480
          tab: 0
481
          authorised_value:
482
          authtypecode: ""
483
          value_builder: ""
484
          isurl: 0
485
          hidden: 7
486
          frameworkcode: ""
487
          seealso: ""
488
          link: ""
489
          defaultvalue:
490
491
        - tagfield: "099"
492
          tagsubfield: "t"
493
          liblibrarian: "Koha item type"
494
          libopac: "Koha item type"
495
          repeatable: 0
496
          mandatory: 1
497
          kohafield: biblioitems.itemtype
498
          tab: 0
499
          authorised_value: TYPEDOC
500
          authtypecode: ""
501
          value_builder: ""
502
          isurl: 0
503
          hidden: 0
504
          frameworkcode: ""
505
          seealso: ""
506
          link: ""
507
          defaultvalue:
508
509
        - tagfield: "099"
510
          tagsubfield: "x"
511
          liblibrarian: "Number of issues"
512
          libopac: "Number of issues"
513
          repeatable: 0
514
          mandatory: 0
515
          kohafield: biblioitems.totalissues
516
          tab: 0
517
          authorised_value:
518
          authtypecode: ""
519
          value_builder: ""
520
          isurl: 0
521
          hidden: 6
522
          frameworkcode: ""
523
          seealso: ""
524
          link: ""
525
          defaultvalue: ""
526
527
  - marc_tag_structure:
473
  - marc_tag_structure:
528
      translatable: [ liblibrarian, libopac ]
474
      translatable: [ liblibrarian, libopac ]
529
      multiline: []
475
      multiline: []
Lines 532-538 tables: Link Here
532
          liblibrarian: "ADDED ENTRY ELEMENTS (KOHA)"
478
          liblibrarian: "ADDED ENTRY ELEMENTS (KOHA)"
533
          libopac: "ADDED ENTRY ELEMENTS (KOHA)"
479
          libopac: "ADDED ENTRY ELEMENTS (KOHA)"
534
          repeatable: 0
480
          repeatable: 0
535
          mandatory: 0
481
          mandatory: 1
536
          authorised_value:
482
          authorised_value:
537
          frameworkcode: ""
483
          frameworkcode: ""
538
484
(-)a/installer/data/mysql/en/marcflavour/unimarc/optional/unimarc_sample_fastadd_framework.yml (-2 / +2 lines)
Lines 38-48 sql_statements: Link Here
38
    SELECT tagfield, liblibrarian, libopac, repeatable, mandatory, authorised_value, 'FA'
38
    SELECT tagfield, liblibrarian, libopac, repeatable, mandatory, authorised_value, 'FA'
39
    FROM marc_tag_structure
39
    FROM marc_tag_structure
40
    WHERE frameworkcode = '' AND
40
    WHERE frameworkcode = '' AND
41
    tagfield IN ('000', '001', '090', '099', '100', '200', '205', '210', '225', '995');"
41
    tagfield IN ('000', '001', '090', '099', '100', '200', '205', '210', '225', '942', '995');"
42
42
43
43
44
  - "INSERT IGNORE INTO marc_subfield_structure (tagfield, tagsubfield, liblibrarian, libopac, repeatable, mandatory, kohafield, tab, authorised_value, authtypecode, value_builder, isurl, hidden, frameworkcode, seealso, link, defaultvalue)
44
  - "INSERT IGNORE INTO marc_subfield_structure (tagfield, tagsubfield, liblibrarian, libopac, repeatable, mandatory, kohafield, tab, authorised_value, authtypecode, value_builder, isurl, hidden, frameworkcode, seealso, link, defaultvalue)
45
    SELECT tagfield, tagsubfield, liblibrarian, libopac, repeatable, mandatory, kohafield, tab, authorised_value, authtypecode, value_builder, isurl, hidden, 'FA', seealso, link, defaultvalue
45
    SELECT tagfield, tagsubfield, liblibrarian, libopac, repeatable, mandatory, kohafield, tab, authorised_value, authtypecode, value_builder, isurl, hidden, 'FA', seealso, link, defaultvalue
46
    FROM marc_subfield_structure
46
    FROM marc_subfield_structure
47
    WHERE frameworkcode = '' AND
47
    WHERE frameworkcode = '' AND
48
    tagfield IN ('000', '001', '090', '099', '100', '200', '205', '210', '225', '995');"
48
    tagfield IN ('000', '001', '090', '099', '100', '200', '205', '210', '225', '942', '995');"
(-)a/installer/data/mysql/mandatory/auth_val_cat.sql (-1 lines)
Lines 57-63 INSERT IGNORE INTO authorised_value_categories( category_name ) VALUES Link Here
57
    ('ETAT'),
57
    ('ETAT'),
58
    ('CAND'),
58
    ('CAND'),
59
    ('COUNTRY'),
59
    ('COUNTRY'),
60
    ('TYPEDOC'),
61
    ('qualif');
60
    ('qualif');
62
61
63
-- For Housebound
62
-- For Housebound
(-)a/t/lib/TestBuilder.pm (-3 / +4 lines)
Lines 185-192 sub build_sample_biblio { Link Here
185
        MARC::Field->new( $tag, ' ', ' ', $subfield => $author ),
185
        MARC::Field->new( $tag, ' ', ' ', $subfield => $author ),
186
    );
186
    );
187
187
188
    ( $tag, $subfield ) = $marcflavour eq 'UNIMARC' ? ( '099', 't' ) : ( 942, 'c' );
188
    ( $tag, $subfield ) = $marcflavour eq 'UNIMARC' ? ( 942, 'c' ) : ( 942, 'c' );
189
    $record->append_fields( MARC::Field->new( $tag, ' ', ' ', $subfield => $itemtype ) );
189
    $record->append_fields(
190
        MARC::Field->new( $tag, ' ', ' ', $subfield => $itemtype ),
191
    );
190
192
191
    my ($biblio_id) = C4::Biblio::AddBiblio( $record, $frameworkcode );
193
    my ($biblio_id) = C4::Biblio::AddBiblio( $record, $frameworkcode );
192
    return Koha::Biblios->find($biblio_id);
194
    return Koha::Biblios->find($biblio_id);
193
- 

Return to bug 38336