Bug 27738: Set fallback for unset DefaultCountryField008 to |||, "no attempt to code"
authorPhil Ringnalda <phil@chetcolibrary.org>
Sun, 21 Feb 2021 18:41:04 +0000 (10:41 -0800)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 6 Apr 2021 13:56:30 +0000 (15:56 +0200)
commitd5e7d37d8a0427f50d31d922df89ba4b16e15c98
treea087a2bd7d4e1128f72ecce13d802ea750f25ee9
parent147b1ced1dee259c4f210d88a5ec902b549d2836
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>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
cataloguing/value_builder/marc21_field_008.pl
koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/cataloguing.pref