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)
committerAndrew Fuerste-Henry <andrew@bywatersolutions.com>
Sun, 25 Apr 2021 13:07:39 +0000 (13:07 +0000)
commit45f423885ab54c7861f001544a004a9d854b9e52
treed2ca58fd6ede8983217965b8f414f548d51130e1
parent1c267a4cb9b2ecac91b48b719bc83b514e6e16e3
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>
(cherry picked from commit d5e7d37d8a0427f50d31d922df89ba4b16e15c98)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit f1837739bbd1aeb65e40a405a7ae674b9eb79792)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
cataloguing/value_builder/marc21_field_008.pl
koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/cataloguing.pref