[Bug 7601] New: Preference for default language for field 008 Range 35-37 (instead of hard coded "eng")
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7601 Bug #: 7601 Summary: Preference for default language for field 008 Range 35-37 (instead of hard coded "eng") Classification: Unclassified Change sponsored?: --- Product: Koha Version: unspecified Platform: All OS/Version: All Status: NEW Severity: enhancement Priority: P5 - low Component: Cataloging AssignedTo: gmcharlt@gmail.com ReportedBy: veron@veron.ch QAContact: koha.sekjal@gmail.com Problem: -------- When a new marc record is added, the language code in field 008 Range 35-37 defaults to Englih ("eng"). This makes cataloguing inefficient and error-prone for librarians if most of the bibliographic data is e.g. in German or in French. Background: ----------- The language code for English (eng) is hard coded in the files ...koha\intranet\cgi-bin\cataloguing\value_builder\marc21_field_008.pl (~Lines 61, 100) and ...koha\intranet\cgi-bin\cataloguing\value_builder\normarc_field_008.pl (~Lines 58, 98) Proposition: ------------ --Step 1 -------------------------- Add somewhere to cataloguing.pref, section "Record Structure" : ----------------------------------- - - Fill in the default language for field 008 Range 35-37 (e.g. eng, nor, ger, see <a href="http://www.loc.gov/marc/languages/language_code.html">MARC Code List for Languages</a>) - pref: DefaultLanguageField008 - " Empty defaults to eng." --Step 2 -------------------------- Change marc21_field_008.pl and normarc_field_008.pl as follows: ----------------------------------- --2a--- Add 3 lines of code at the top of the functions sub plugin_javascript and sub plugin: my $lang = C4::Context->preference('DefaultLanguageField008' ); $lang = "eng" unless $lang; $lang = pack("A3", $lang); The code defaults an empty value to "eng" makes sure that the code has a lenght of 3 letters. --2b--- In both functions, replace hard coded eng with $lang: document.getElementById(\"$field_number\").value='$dateentered' + 't xxu||||| |||| 00| 0 $lang d'; $result = "$dateentered" . "t xxu||||| |||| 00| 0 $lang d" unless $result; --Step 3---------------------------------------------------------------------- Login to Koha, go to Home › Administration › System Preferences (Cataloging) and test with empty value and different language codes (ger, ita etc.) ------------------------------------------------------------------------------ I implemented and tested this locally with marc21_field_008.pl (Koha 3.06.02.003) -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7601 --- Comment #1 from Marc Véron <veron@veron.ch> 2012-02-25 21:54:43 UTC --- Created attachment 7881 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=7881 Changed marc21_field_008.pl -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7601 --- Comment #2 from Marc Véron <veron@veron.ch> 2012-02-25 21:57:03 UTC --- Created attachment 7882 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=7882 cataloguing.pref with preference for 008 default language added -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7601 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |marc@msys.ch See Also| |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=7586 -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7601 --- Comment #3 from Marc Véron <veron@veron.ch> --- Created attachment 9987 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=9987&action=edit Bug 7601 - Preference for default language for field 008 Range 35-37 (instead of hard coded "eng") When a new marc record is added, the language code in field 008 Range 35-37 defaults to Englih ("eng"). This makes cataloguing inefficient and error-prone for librarians if most of the bibliographic data is e.g. in German or in French. Test: - Apply patch - Edit preference DefaultLanguageField008, fill in e.g. 'ger' - Go to Cataloguing, Add marc Record - Click in field 008. Language code should read 'ger' (instead of 'eng') -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7601 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #7882|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7601 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #7881|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7601 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P5 - low |P3 CC| |veron@veron.ch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7601 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7601 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|unspecified |master -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7601 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #9987|0 |1 is obsolete| | --- Comment #4 from Chris Cormack <chris@bigballofwax.co.nz> --- Created attachment 9988 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=9988&action=edit Bug 7601 - Preference for default language for field 008 Range 35-37 (instead of hard coded "eng") When a new marc record is added, the language code in field 008 Range 35-37 defaults to Englih ("eng"). This makes cataloguing inefficient and error-prone for librarians if most of the bibliographic data is e.g. in German or in French. Test: - Apply patch - Edit preference DefaultLanguageField008, fill in e.g. 'ger' - Go to Cataloguing, Add marc Record - Click in field 008. Language code should read 'ger' (instead of 'eng') Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7601 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off CC| |chris@bigballofwax.co.nz -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7601 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA CC| |paul.poulain@biblibre.com --- Comment #5 from Paul Poulain <paul.poulain@biblibre.com> --- QA comment: * small patch that replaces a hardcoded value by a syspref * Despite his size, the content of the patch is tiny, loading the syspref, filling it to 3 chars, and using it instead of the default passed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7601 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master Version|master |rel_3_10 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7601 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=9269 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org