Bugzilla – Attachment 37269 Details for
Bug 13912
Add syspref for default place of publication (country code) for field 008, range 15-17
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 13912 - System preference for default place of publication (country code) for field 008, range 15-17
Bug-13912---System-preference-for-default-place-of.patch (text/plain), 5.91 KB, created by
Biblibre Sandboxes
on 2015-03-26 13:04:37 UTC
(
hide
)
Description:
Bug 13912 - System preference for default place of publication (country code) for field 008, range 15-17
Filename:
MIME Type:
Creator:
Biblibre Sandboxes
Created:
2015-03-26 13:04:37 UTC
Size:
5.91 KB
patch
obsolete
>From 1cff2423949032dd2c6d6620dac9123454bf0a25 Mon Sep 17 00:00:00 2001 >From: Josef Moravec <josef.moravec@gmail.com> >Date: Thu, 26 Mar 2015 08:46:45 +0100 >Subject: [PATCH] Bug 13912 - System preference for default place of > publication (country code) for field 008, range 15-17 > >Signed-off-by: m23 <black23@gmail.com> >--- > cataloguing/value_builder/marc21_field_008.pl | 10 ++++++++-- > installer/data/mysql/sysprefs.sql | 1 + > installer/data/mysql/updatedatabase.pl | 7 +++++++ > .../prog/en/modules/admin/preferences/cataloguing.pref | 4 ++++ > 4 files changed, 20 insertions(+), 2 deletions(-) > >diff --git a/cataloguing/value_builder/marc21_field_008.pl b/cataloguing/value_builder/marc21_field_008.pl >index 8a16bae..0e5bd66 100755 >--- a/cataloguing/value_builder/marc21_field_008.pl >+++ b/cataloguing/value_builder/marc21_field_008.pl >@@ -50,6 +50,9 @@ sub plugin_javascript { > my $lang = C4::Context->preference('DefaultLanguageField008' ); > $lang = "eng" unless $lang; > $lang = pack("A3", $lang); >+ my $country = C4::Context->preference('DefaultCountryField008'); >+ $country = "xxu" unless $country; >+ $country = pack("A3", $country); > > my ($dbh, $record, $tagslib, $field_number, $tabloop) = @_; > my $function_name = $field_number; >@@ -61,7 +64,7 @@ function Focus$function_name(subfield_managed) { > if ( document.getElementById(\"$field_number\").value ) { > } > else { >- document.getElementById(\"$field_number\").value='$dateentered' + 'b xxu||||| |||| 00| 0 $lang d'; >+ document.getElementById(\"$field_number\").value='$dateentered' + 'b $country||||| |||| 00| 0 $lang d'; > } > return 1; > } >@@ -93,6 +96,9 @@ sub plugin { > my $lang = C4::Context->preference('DefaultLanguageField008' ); > $lang = "eng" unless $lang; > $lang = pack("A3", $lang); >+ my $country = C4::Context->preference('DefaultCountryField008'); >+ $country = "xxu" unless $country; >+ $country = pack("A3", $country); > > my ($input) = @_; > my $index = $input->param('index'); >@@ -158,7 +164,7 @@ sub plugin { > } > ); > >- $result = "$dateentered" . "b xxu||||| |||| 00| 0 $lang d" unless $result; >+ $result = "$dateentered" . "b $country||||| |||| 00| 0 $lang d" unless $result; > my $errorXml = ''; > # Check if the xml, xsd exists and is validated > my $dir = C4::Context->config('intrahtdocs') . '/prog/' . $template->{lang} . '/data/'; >diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql >index 60dec6a..7db7132 100644 >--- a/installer/data/mysql/sysprefs.sql >+++ b/installer/data/mysql/sysprefs.sql >@@ -95,6 +95,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('decreaseLoanHighHoldsDuration',NULL,'','Specifies a number of days that a loan is reduced to when used in conjunction with decreaseLoanHighHolds','Integer'), > ('decreaseLoanHighHoldsValue',NULL,'','Specifies a threshold for the minimum number of holds needed to trigger a reduction in loan duration (used with decreaseLoanHighHolds)','Integer'), > ('DefaultClassificationSource','ddc',NULL,'Default classification scheme used by the collection. E.g., Dewey, LCC, etc.','ClassSources'), >+('DefaultCountryField008','','','Fill in the default country code for field 008 Range 15-17 - Place of publication, production, or execution. See <a href=\"http://www.loc.gov/marc/countries/countries_code.html\">MARC Code List for Countries</a>','Free'), > ('DefaultLanguageField008','','','Fill in the default language for field 008 Range 35-37 of MARC21 records (e.g. eng, nor, ger, see <a href=\"http://www.loc.gov/marc/languages/language_code.html\">MARC Code List for Languages</a>)','Free'), > ('DefaultLongOverdueChargeValue', NULL, NULL, "Charge a lost item to the borrower's account when the LOST value of the item changes to n.", 'integer'), > ('DefaultLongOverdueDays', NULL, NULL, "Set the LOST value of an item when the item has been overdue for more than n days.", 'integer'), >diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl >index 951060f..433930b 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/installer/data/mysql/updatedatabase.pl >@@ -9902,6 +9902,13 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { > SetVersion ($DBversion); > } > >+$DBversion = "3.19.00.XXX"; >+if ( CheckVersion($DBversion) ) { >+ $dbh->do("INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES ('DefaultCountryField008','','','Fill in the default country code for field 008 Range 15-17 - Place of publication, production, or execution. See <a href=\"http://www.loc.gov/marc/countries/countries_code.html\">MARC Code List for Countries</a>','Free')"); >+ print "Upgrade to $DBversion done (Bug 13912: System preference for default place of publication (country code) for field 008, range 15-17)\n"; >+ SetVersion($DBversion); >+} >+ > =head1 FUNCTIONS > > =head2 TableExists($table) >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/cataloguing.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/cataloguing.pref >index bc35aad..f46350c 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/cataloguing.pref >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/cataloguing.pref >@@ -44,6 +44,10 @@ Cataloging: > - pref: DefaultLanguageField008 > - " Empty defaults to eng." > - >+ - Fill in the default country code for field 008 Range 15-17 - Place of publication, production, or execution. See <a href"http://www.loc.gov/marc/countries/countries_code.html\">MARC Code List for Countries</a> >+ - pref: DefaultCountryField008 >+ - " Empty defaults to xxu for United States." >+ - > - Interpret and store MARC records in the > - pref: marcflavour > choices: >-- >1.7.10.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 13912
:
37254
|
37255
|
37261
|
37262
|
37269
|
37270
|
37313
|
37314
|
66963
|
66964
|
66965
|
67235