Bugzilla – Attachment 119041 Details for
Bug 27738
Set fallback for unset DefaultCountryField008 to |||, "no attempt to code"
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 27738: Set fallback for unset DefaultCountryField008 to |||, "no attempt to code"
Bug-27738-Set-fallback-for-unset-DefaultCountryFie.patch (text/plain), 2.99 KB, created by
Julian Maurice
on 2021-03-31 11:43:33 UTC
(
hide
)
Description:
Bug 27738: Set fallback for unset DefaultCountryField008 to |||, "no attempt to code"
Filename:
MIME Type:
Creator:
Julian Maurice
Created:
2021-03-31 11:43:33 UTC
Size:
2.99 KB
patch
obsolete
>From 54701af045105afa861f267682b9e04bfe103e94 Mon Sep 17 00:00:00 2001 >From: Phil Ringnalda <phil@chetcolibrary.org> >Date: Sun, 21 Feb 2021 10:41:04 -0800 >Subject: [PATCH] Bug 27738: Set fallback for unset DefaultCountryField008 to > |||, "no attempt to code" > >Current code intended to set a fallback of xxu, an unknown state in the US, >but because the preference is always defined, just sometimes unset, it >actually falls back to three spaces, an invalid value. This patch instead >uses the fallback value ||| which means no attempt to code. > >Test plan: >1. Without the patch, verify that the value of the system preference >DefaultCountryField008 is empty. >2. Cataloging - New record - Default framework (if you have the Advanced >editor enabled, Settings - Switch to basic editor, this only applies to the >basic editor) >3. On tab 0, click in the text input for field 008 which fills in default >values, then click the Tag editor button at the end of the field >4. In the popup window, verify that the value for 15-17 is shown as ### >indicating three spaces >5. Apply patch, repeat the steps above, verify that the value is now ||| > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> >--- > cataloguing/value_builder/marc21_field_008.pl | 3 ++- > .../prog/en/modules/admin/preferences/cataloguing.pref | 2 +- > 2 files changed, 3 insertions(+), 2 deletions(-) > >diff --git a/cataloguing/value_builder/marc21_field_008.pl b/cataloguing/value_builder/marc21_field_008.pl >index b3c5d0c47f..0951e10a6a 100755 >--- a/cataloguing/value_builder/marc21_field_008.pl >+++ b/cataloguing/value_builder/marc21_field_008.pl >@@ -36,7 +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"; >+ my $country = C4::Context->preference('DefaultCountryField008'); >+ $country = "|||" unless $country; > $country = pack("A3", $country); > > my $function_name = $params->{id}; >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 bee04d5922..0ea0df69a2 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 >@@ -63,7 +63,7 @@ Cataloging: > - > - "Fill in the default country code for field 008 Range 15-17 of MARC21 - 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." >+ - " Empty defaults to ||| for No attempt to code." > - > - Interpret and store MARC records in the > - pref: marcflavour >-- >2.20.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 27738
:
117126
|
117134
| 119041 |
119211