Hi Jonathan

You wrote:

> For kidding I wanted to answer you that dots were missing.
> But actually:
> % echo '...................................'|wc -m # number of dots before ger
> 36
> % echo '190315b ||||| |||| 00| 0 '|wc -m # all chars before ger
> 26

In fact the MARC view in the staff client and the OPAC do not show the correct content (as foudn in the database) of any field, if mor than one blnak does appear fllowing each other - instead the they will be automatically collapsed down by the webbrowser to just one. Even the MARC plain view in the OPAC behaves in this wrong way; and only (but most importantly) the actual catalogueing framework behaves correctly.

So the OPAC view etc will show something like the following, which according to the MARC 21 format can never be correct because MARC 008 MUST contain 40 characters, but the OPAC view does only show 31 in this case:

190315b ||||| |||| 00| 0 ger d

However, of course I hope the Batch record modification will work on the actual data in the database which of course actually does contain exactly 40 characters: (I kept the tags to show where the data actually begins and ends, since blanks are hardly visible)

<controlfield tag="008">800422s1978 sz a 1 ger </controlfield>

> Maybe there are too many?

No, I have counted them before, my regular expression looks like

m/^...................................ger..$/

According to the MARC 21 Format for Bibliographic Data controlfield 008 contains 40 positions. In my regular expression

* positions 0-34 can contain any character (thus 35 dots)

* positions 35-37 must contain "ger" (thus the three characters "ger")

* positions 38-39 can contain any character (thus 2 dots).

All in all my expressions does contain 40 positions. So I guess it should work, but it doesn't. Is this maybe a bug?

Best wishes: Michael
--
Geschäftsführer · Diplombibliothekar BBS, Informatiker eidg. Fachausweis
Admin Kuhn GmbH · Pappelstrasse 20 · 4123 Allschwil · Schweiz
T 0041 (0)61 261 55 61 · E m...@adminkuhn.ch · W www.adminkuhn.ch



Le ven. 15 mars 2019 à 15:42, Michael Kuhn <m...@adminkuhn.ch> a écrit :

Hi

Currently some Koha newbies have forgotten to add the value "ger" in
MARC 041$a when catalogueing, but they did add the correct value "ger"
in MARC 008,35-37. However, this results in some missing entries in the
language facet. The plain MARC view in the OPAC of such a record may
look like this:

   000 00216nam a22001097a 4500
   999 _c470
       _d470
   003 OSt
   005 20190315191317.0
   008 190315b ||||| |||| 00| 0 ger d
   040 _cOSt
   245 _aTest
   942 _2z
       _cBK

In fact it is missing

   041 _ager

Thus I tried using the MARC modification templates in Koha menu "Tools >
Batch record modification", adding a template with the following action
(as copied from the interface):

Add new field 041$a with value ger if 008 matches RegEx
m/^...................................ger..$/

When I run this action over the given record, Koha tells me that the
bibliographic record has successfully been modified - but in fact
nothing has changed.

Besides it is not possible to unload that record using "Data export",
but it is there an can be searched via staff client and OPAC.

What is wrong with my evil doing? Is it something with my regular
expression?

Best wishes: Michael
--
Geschäftsführer · Diplombibliothekar BBS, Informatiker eidg. Fachausweis
Admin Kuhn GmbH · Pappelstrasse 20 · 4123 Allschwil · Schweiz
T 0041 (0)61 261 55 61 · E m...@adminkuhn.ch · W www.adminkuhn.ch
_______________________________________________
Koha mailing list  http://koha-community.org
Koha@lists.katipo.co.nz
https://lists.katipo.co.nz/mailman/listinfo/koha

Reply via email to