Bug 10335 - UNIMARC authorities search doesn't display properly information on parallel form
Summary: UNIMARC authorities search doesn't display properly information on parallel form
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: MARC Authority data support (show other bugs)
Version: master
Hardware: All All
: P5 - low minor (vote)
Assignee: Janusz Kaczmarek
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-24 13:17 UTC by Janusz Kaczmarek
Modified: 2015-12-03 22:00 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Proposed patch (3.62 KB, patch)
2013-05-24 13:22 UTC, Janusz Kaczmarek
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 10335 - UNIMARC authorities search doesn't display properly information on parallel form (3.91 KB, patch)
2013-09-07 23:35 UTC, Bernardo Gonzalez Kriegel
Details | Diff | Splinter Review
[PASSED QA] Bug 10335 - UNIMARC authorities search doesn't display properly information on parallel form (4.03 KB, patch)
2013-10-07 06:47 UTC, Katrin Fischer
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 10355: paramater 'object' lost on the road (2.62 KB, patch)
2015-05-17 21:40 UTC, Bernardo Gonzalez Kriegel
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Janusz Kaczmarek 2013-05-24 13:17:27 UTC
UNIMARC authorities can contain translated headings.  The language is coded in $8 subfield:

"Subfield $8 contains 6 character positions (designated as $8/0, 8/1, etc.)  The first group of three characters specifies the language of catalogue into which the heading in the field is designed to fit; the second group of three characters specifies the language of the base heading. The language codes are listed in the ISO 639-2 standard and in Appendix A of the UNIMARC Manual - Bibliographic Format."  (cf. UNIMARC manual : authorities format. -- 2nd rev. and enl. ed. -- München : Saur, 2001, p. 66)

I.e. it is the second triple designates the language of in which the actual parallel form is entered. 

Currently the information is displayed wrongly.  

To reproduce:
1) Create an authority record with main heading (100) in Latin script (e.g. Oppenheimer, Aharon -- subfields $a and $b) and parallel form (700) in Hebrew (אופנהיימר, אהרן -- subfields $a and $b). Mark it correctly in $8 with freheb (or engheb if you like);
2) reindex and search;
3) you will see: 

Oppenheimer Aharon
freheb: אופנהיימר 

Whereas you would rather like to see (mind language and lack of $b above):

Oppenheimer, Aharon 
Hebrew: אופנהיימר, אהרן 

A patch will follow.
Comment 1 Janusz Kaczmarek 2013-05-24 13:22:22 UTC Comment hidden (obsolete)
Comment 2 Mathieu Saby 2013-05-26 11:02:40 UTC
Hello Janusz
Good idea, but I would like to make some comments before testing : 

The $8 contains the code for a language, not for a kind of script. Scripts codes are stored  in $7, on 2 characters (interesting info = position 4-5)
ba 	latin
ca 	cyrillic
fa 	arabe
ga 	grec
ha 	hébreu
etc.

The $8 subfield (not mandatory) can be used in 7XX, but also in 2XX or 4XX.

So, you can have a field coded in case of romanized record, you can have 2 repeated fields, with the same $8, but different $7.

That's the way we work in France. I hope it is not wrong...

Ex from unimarc manual : 
200 #1 $7ba0yba0a $8engrus $aGlinka,$bMihail Ivanovič
200 #1 $7ba0yca0y $8engrus $aГлинка,$bМихайл Иванович

The $7 is mandatory in case of double script records, but the $8 is not mandatory.

The possible codes in $7 are limited (a dozen), but ALL 639-2 iso codes can be used in $8. So I wonder if managing them in the templates is a good solution.

So, could you tell me if your patch deals only with 7XX fields ?

M. Saby
Comment 3 Janusz Kaczmarek 2013-05-26 11:26:43 UTC
Mathieu,

I perfectly agree with what you wrote.  Of course while cataloguing one should fill up $7 as well to have correct data produced--but it seems that Koha does not make any use of $7 for now.

BTW, according to the cited "UNIMARC manual : authorities format" (p. 66):

"$8 -- Occurrence
Mandatory in each 7-- heading when parallel headings or parallel data. Optional in 2--, 4--, 5--. Not repeatable."

My patch is not an enhancement (and does not deal with $7 script-story, nor with 4XX and 5XX, nor with shifting languages expansion away from the templates, which would be a good idea).  Its aim was only to fix what seemed to be wrong in the existing code.  So it deals only with what and how Koha extracts from 7XX ($8, $a, $b) for the display in auth. search results.

Hope this explains my motivations and the scope of the patch.

Janusz
Comment 4 Mathieu Saby 2013-05-26 12:05:43 UTC
You are right for the $8, I did not know it was mandatory for 7XX.
In french universities network, we consider it as non mandatory.
http://documentation.abes.fr/sudoc/formats/unma/DonneesCodees/CodesDollar8.htm#TOP
"La sous-zone $8 est facultative."
But maybe our cataloguing tool fill it automaticly if we don't do it.

For $7 codes, in my library I created an authorised values category with scripts codes, and link them to $7 fields in bibliographic framework. So when you catalog a record, you can pick the cataloguing script in a dropdown list.
But we don't display it in OPAC or Staff interface. Not sure it is very important.

M. Saby
Comment 5 Janusz Kaczmarek 2013-05-26 14:19:07 UTC
I see.  Than, apparently, the SUDOC instruction authors made a simplification.  The French version of the official recommendation reads:

"$8 - Occurrence
Obligatoire pour chaque zone 7XX dans le cas de vedettes parallèles ou de données parallèles. Facultatif dans les zones 2XX, 4XX, 5XX.
Non répétable." (http://www.bnf.fr/documents/UnimarcA.pdf, p. 74)

So as far as I am able to understand French, it is the same ;)

As to filling up with authorized values--good choice!  I have $7 and $8 configured this way.

As I wrote, it ($7, $8) may seem not to be very important because Koha makes (almost) no use of it, but if one would like to reuse the data some day (if Koha dies some day, what is not our wish, but just in case), data should conform to the standard :)
Comment 6 Mathieu Saby 2013-05-26 14:26:06 UTC
(En réponse au commentaire 5)
> I see.  Than, apparently, the SUDOC instruction authors made a
> simplification.  The French version of the official recommendation reads:
> 
> "$8 - Occurrence
> Obligatoire pour chaque zone 7XX dans le cas de vedettes parallèles ou de
> données parallèles. Facultatif dans les zones 2XX, 4XX, 5XX.
> Non répétable." (http://www.bnf.fr/documents/UnimarcA.pdf, p. 74)
> 
> So as far as I am able to understand French, it is the same ;)

You understand well.

> 
> As to filling up with authorized values--good choice!  I have $7 and $8
> configured this way.
> 
> As I wrote, it ($7, $8) may seem not to be very important because Koha makes
> (almost) no use of it, but if one would like to reuse the data some day (if
> Koha dies some day, what is not our wish, but just in case), data should
> conform to the standard :)

If the question is "how to fill properly $7 and $8", that's not difficult : the answer could be : map these subfields with some authorized values in default framework, or maybe create some plugins if necessary. 

M. Saby
Comment 7 Bernardo Gonzalez Kriegel 2013-09-07 23:35:37 UTC Comment hidden (obsolete)
Comment 8 Mathieu Saby 2013-09-08 08:12:19 UTC
Hey, you are becoming an UNIMARC expert Bernardo ;-)
Mathieu
Comment 9 Katrin Fischer 2013-10-07 06:42:19 UTC
I have tried and I can't seem to catalog it right, can I get a full example with all fields and subfields to enter?
Comment 10 Katrin Fischer 2013-10-07 06:47:42 UTC
Created attachment 21842 [details] [review]
[PASSED QA] Bug 10335 - UNIMARC authorities search doesn't display properly information on parallel form

The patch corrects the issue and should not harm those who (improperly)
put only one triple in $8

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Work as described. No koha-qa errors.
Same result on OPAC and STAFF

Turns out that test plan is wrong,
you neet to fill tag 200ab, not 100ab, for main heading.
I filled 100a with some example data from UNIMARC auth manual.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Took me a bit to figure it out, works according to test plan.
Comment 11 Galen Charlton 2013-10-10 19:16:48 UTC
Pushed to master.  Thanks, Janusz!
Comment 12 Tomás Cohen Arazi 2013-12-02 18:14:42 UTC
This patch has been pushed to 3.12.x, will be in 3.12.8.

Thanks Janusz!
Comment 13 Bernardo Gonzalez Kriegel 2015-05-17 21:40:15 UTC Comment hidden (obsolete)
Comment 14 Bernardo Gonzalez Kriegel 2015-05-17 21:41:07 UTC
Comment on attachment 39258 [details] [review]
[SIGNED-OFF] Bug 10355: paramater 'object' lost on the road

Sorry, wrong bug number