Bug 8347

Summary: Koha forces UNIMARC 100 field code language to 'fre'
Product: Koha Reporter: Frédéric Demians <f.demians>
Component: CatalogingAssignee: Vitor Fernandes <vfernandes>
Status: CLOSED FIXED QA Contact: Katrin Fischer <katrin.fischer>
Severity: enhancement    
Priority: P1 - high CC: chris, katrin.fischer, m.de.rooy, rolando.isidoro, vfernandes
Version: unspecified   
Hardware: All   
OS: All   
Change sponsored?: Sponsored Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 4368, 8136    
Bug Blocks: 9453    
Attachments: BUG 8347 - Koha forces UNIMARC 100 field code language to 'fre'
BUG 8347 - Koha forces UNIMARC 100 field code language to 'fre'
BUG - Koha forces UNIMARC 100 field code language to 'fre'
[PASSED QA] BUG 8347 - Koha forces UNIMARC 100 field code language to 'fre'
[PASSED QA] BUG 8347 - Koha forces UNIMARC 100 field code language to 'fre'
[PASSED QA] BUG 8347 - Koha forces UNIMARC 100 field code language to 'fre'

Description Frédéric Demians 2012-07-03 05:46:30 UTC
Reported on Koha mailing list:

  I can not change the UNIMARC 100 FIELD  Language of cataloging. I
  changed the default "fre" to "chi",   I saved it . But I find all  100
  FIELD  Language of cataloging  are "fre" again.

Take a look at C4/Biblio.pm module, line 3547:

  substr( $string, 22, 6, "frey50" );

Check also rebuild_zebra.pl fix_unimarc_100() function.
Comment 1 Vitor Fernandes 2012-11-28 10:10:49 UTC
This should be a system preference.
I've done a similar patch to authorities 100 field, where the default language was french to.
I can devellop a patch for this, where "frey50" should the default value of the system preference.

Cataloguing tab -> Record structure section

UNIMARCField100 = "frey50"

What you think about this?
Comment 2 Vitor Fernandes 2012-11-29 11:05:50 UTC Comment hidden (obsolete)
Comment 3 Vitor Fernandes 2012-12-04 16:19:49 UTC Comment hidden (obsolete)
Comment 4 Vitor Fernandes 2012-12-05 15:36:08 UTC Comment hidden (obsolete)
Comment 5 Rolando Isidoro 2013-01-23 10:22:43 UTC
Tested and working in version 3.8.5.
Comment 6 Katrin Fischer 2013-02-17 22:47:29 UTC
Created attachment 15483 [details] [review]
[PASSED QA] BUG 8347 - Koha forces UNIMARC 100 field code language to 'fre'

Added a new system preference to set the UNIMARC field 100 default language.
The default value for that system preference is 'fre'.
Changed Biblio.pm to use the system preference:

- if the language is bad filled in the preferences it uses 'fre' as default value
- only replaces the language when the field 100 is empty
- if the language is filled with the plugin only replaces the positions 25-28 to 'y50'

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Comment 7 Katrin Fischer 2013-02-17 22:47:37 UTC
Created attachment 15484 [details] [review]
[PASSED QA] BUG 8347 - Koha forces UNIMARC 100 field code language to 'fre'

Forget to add the system preference to the template.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Comment 8 Katrin Fischer 2013-02-17 22:47:46 UTC
Created attachment 15485 [details] [review]
[PASSED QA] BUG 8347 - Koha forces UNIMARC 100 field code language to 'fre'

Changed Charset.pm to use defaultlanguage instead of 'fre'.

http://bugs.koha-community.org/show_bug.cgi?id=8347

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.

1) Check system preference was added correctly:
   UNIMARCField100Language
2) Change code in preference to be not 'fre'.
3) Catalog a bibliographic record.
  - check plugin shows new value
  - check empty field is filled with new value from the plugin
  - check you can still edit it to be something else
Comment 9 Jared Camins-Esakov 2013-02-20 14:08:03 UTC
This patch has been pushed to master.
Comment 10 Chris Cormack 2013-02-21 05:47:50 UTC
This does not apply on 3.10.x please rebase and submit if you wish it on that branch.
Comment 11 Vitor Fernandes 2013-02-21 08:23:24 UTC
Chris,

For me it's fine to only appear in 3.12.