Bugzilla – Attachment 66963 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: Add DefaultCountryField008 syspref
Bug-13912-Add-DefaultCountryField008-syspref.patch (text/plain), 5.23 KB, created by
Tomás Cohen Arazi (tcohen)
on 2017-09-07 19:26:54 UTC
(
hide
)
Description:
Bug 13912: Add DefaultCountryField008 syspref
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2017-09-07 19:26:54 UTC
Size:
5.23 KB
patch
obsolete
>From dfcee52234ec150df4a8af065ec698099cb1ca12 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: Add DefaultCountryField008 syspref > >This syspref is going to be used for populating field 008, range 15-17 >with a desired default. It is currently hardcoded to 'xxu'. If not set, >it will still fallback to 'xxu'. > >Signed-off-by: m23 <black23@gmail.com> >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > cataloguing/value_builder/marc21_field_008.pl | 8 ++++++-- > installer/data/mysql/sysprefs.sql | 1 + > .../prog/en/modules/admin/preferences/cataloguing.pref | 4 ++++ > 3 files changed, 11 insertions(+), 2 deletions(-) > >diff --git a/cataloguing/value_builder/marc21_field_008.pl b/cataloguing/value_builder/marc21_field_008.pl >index e47a20de48..5da53dcdad 100755 >--- a/cataloguing/value_builder/marc21_field_008.pl >+++ b/cataloguing/value_builder/marc21_field_008.pl >@@ -36,6 +36,8 @@ my $builder = sub { > my $lang = C4::Context->preference('DefaultLanguageField008' ); > $lang = "eng" unless $lang; > $lang = pack("A3", $lang); >+ my $country = C4::Context->preference('DefaultCountryField008') // "xxu"; >+ $country = pack("A3", $country); > > my $function_name = $params->{id}; > my $dateentered = date_entered(); >@@ -47,7 +49,7 @@ function Focus$function_name(event) { > if ( document.getElementById(event.data.id).value ) { > } > else { >- document.getElementById(event.data.id).value='$dateentered' + 'b xxu||||| |||| 00| 0 $lang d'; >+ document.getElementById(event.data.id).value='$dateentered' + 'b $country||||| |||| 00| 0 $lang d'; > } > return 1; > } >@@ -77,6 +79,8 @@ my $launcher = sub { > my $lang = C4::Context->preference('DefaultLanguageField008' ); > $lang = "eng" unless $lang; > $lang = pack("A3", $lang); >+ my $country = C4::Context->preference('DefaultCountryField008') // "xxu"; >+ $country = pack("A3", $country); > > my $index = $input->param('index'); > my $result = $input->param('result'); >@@ -142,7 +146,7 @@ my $launcher = sub { > ); > > my $dateentered = date_entered(); >- $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 5155fe7aa7..33b11bc201 100644 >--- a/installer/data/mysql/sysprefs.sql >+++ b/installer/data/mysql/sysprefs.sql >@@ -123,6 +123,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('decreaseLoanHighHoldsIgnoreStatuses', '', 'damaged|itemlost|notforloan|withdrawn', "Ignore items with these statuses for dynamic high holds checking", 'Choice'), > ('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, "Charge a lost item to the borrower's account when the LOST value of the item changes to n.", 'integer'), > ('DefaultLongOverdueDays', '', NULL, "Set the LOST value of an item when the item has been overdue for more than n days.", 'integer'), >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 1aeadf9860..51d4c97b80 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 >@@ -43,6 +43,10 @@ Cataloging: > - 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>) > - 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 >-- >2.14.1
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