https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38336 --- Comment #53 from Mathieu Saby <mathsabypro@gmail.com> --- Created attachment 204532 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=204532&action=edit Bug 38336: Fix confusion between 099 and 942 UNIMARC fields (updated) This patch fixes 099 and 942 fields (and incidentally 200$b) in the default and the FA UNIMARC frameworks and provides the changes that follow logically : - Zebra and Elasticsearch indexing - removal of the unused TYPEDOC authorized values category - UNIMARC facets in Koha.pm These changes are minimal and are intended to correct only the most serious problems. Subsequent work may bring improvements. Commit message edited in 30/8/2026 only to fix description and test plan. No code change. Note that a followup patch on the same bug has its own test plan. For practical reasons, you can test both patches at the same time when testing changes made to the Elasticsearch indexing engine settings (part C of the main test plan). Detail of changes : - The 099 field is renamed "ADDED ENTRY ELEMENTS (KOHA)" like 942 in MARC21, and should be used in the same way. It is mandatory, because the 099$t (item type) is mandatory. It is present in FA and default frameworks. - The 942 field is renamed "OTHER ADDED ENTRY ELEMENTS (KOHA)". It is not mandatory, and may removed by subsequent Bugzilla bugs. It is present in default framework but not in FA framework. - Subfields $c and $s are removed from 942 because they are already defined in 099. - The 200$b field is no more indexed (it is now obsolete in cataloguing standards, and its MARC21 counterpart is not indexed). - Like in MARC21 ccode is now defined only at item level. - Like in MARC21 itemtype/itype is now defined both at item and biblio levels. - The default values for itemtype at biblio and item level are the same, controlled by itype values (document type). - The TYPEDOC authorized values category, which was used for controlling the value if itemtype at record level, is removed. - In Koha.pm UNIMARC facets are fixed to be a mirror of MARC21 facets: a facet for itemtypes is created, and the facet for ccode is now based only on items. Revised test plan : Note that sample data in ktd and sandbox may need to be fixed once this patch is pushed. It may cause warnings if you edit existing record but it is not a bug. A. Check default and AV framework changes 1/ Run a UNIMARC Koha with Zebra search engine, in k-t-d or in a sandbox (if you use a sandbox, apply directly the patch). Note that in sept. 2026 public sandboxes are using Zebra, except for Biblibre sandboxes, which use ES. Double check in the about page that Koha is runing Zebra 2/ If you use k-t-d, run ktd --shell, apply the patch and run reset_all to rebuild database 3/ Check that there is no "TYPEDOC" authorized value category 4/ Check FA framework - 099 field should be labelled "ADDED ENTRY ELEMENTS (KOHA)" and contain subfields c, d, t (item type), s (serial flag), x (totalissues) - subfield t should NOT be linked to TYPEDOC auth. value - there should be no 942 field 5/ Check default framework - 099 should be the same as FA framework - 942 should be labelled "OTHER ADDED ENTRY ELEMENTS (KOHA)" - 942 should contain subfields "2" (Source of classification or shelving scheme) and "6" (Koha normalized classification for sorting) 6/ Create a new record with default framework - add a 200$a field, a 100$a field (with the cataloging plugin) - in 099$t field, check that the values in dropdown list are the one defines for 'item types' in administration (Books, Computer Files, Continuing Resource, etc). - Choose the value "Computer field" and Save the record - Koha displays the item creation form. Check that the preselected value in 995$r (item type) is "Computer field" 7/ Do the same operation for a new record with FA framework B. Check Zebra indexing changes 8 / Search "univers" in the catalog. 140 results should be shown 9 / Check that an "Item type" facet is visible and functional 10 / Edit the first record of the result list, change its 099t value, for instance "Book" and save 11 / Edit an item of that record and change the 995$r (item type) value with a value different from the 099$t, for instance "Maps", and set a value (Non-fiction, Fiction or Reference) in the 995$h (collection) 12 / Refresh the search for "livre" 13 / Check that the facet "Item types" has been updated (with 995$r and 099$t values) and that a facet "Collections" is shown and functional (with te value of 995$h) C. Check Elasticsearch indexing changes 14/ Run a UNIMARC Koha with Elasticsearch search engine, in k-t-d (ktd --search-engine es8 up) or in a sandbox (if you use a sandbox, apply directly the patch). Note that in sept. 2026 only Biblibre sandboxes are using Elasticsearch. Double check in the about page that Koha is runing Elasticsearch 15/ If you use k-t-d, run ktd --shell, apply the patch and run reset_all to rebuild database 16/ Repeat operations 8 to 13 in that new instance 74 results should be shown after the "univers" search in step 8, instead of 140 for Zebra, but this is a normal discrepancy. The Collections facet is not at the same place (bottom of factets, just before Home libray) as the Zebra one. This is not a bug, and could be discussed in an other bz. Sponsored-by: Université Côte d'Azur Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.