Bug 27739 - Advanced editor should use DefaultCountryField008 system preference rather than hardcoding xxu
Summary: Advanced editor should use DefaultCountryField008 system preference rather th...
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Cataloging (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Phil Ringnalda
QA Contact: Nick Clemens
URL:
Keywords:
Depends on: 27738
Blocks:
  Show dependency treegraph
 
Reported: 2021-02-21 18:06 UTC by Phil Ringnalda
Modified: 2021-04-25 20:42 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Text to go in the release notes:
Version(s) released in:
21.05.00,20.11.05,20.05.11


Attachments
Bug 27739: Advanced editor should use DefaultCountryField008 preference (3.13 KB, patch)
2021-04-02 02:32 UTC, Phil Ringnalda
Details | Diff | Splinter Review
Bug 27739: Advanced editor should use DefaultCountryField008 preference (3.19 KB, patch)
2021-04-02 20:36 UTC, David Nind
Details | Diff | Splinter Review
Bug 27739: Advanced editor should use DefaultCountryField008 preference (3.24 KB, patch)
2021-04-15 19:12 UTC, Nick Clemens
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Phil Ringnalda 2021-02-21 18:06:01 UTC
cateditor-widgets-marc21.inc uses DefaultLanguageField008 for the initial value of the language in 008/35-37, but just hardcodes xxu rather than using the companion pref DefaultCountryField008 for 008/15-17.

Since using the pref requires a fallback when it's unset, and bug 27738 proposes changing the current fallback in the basic editor, this bug should wait on an outcome there before being fixed.
Comment 1 Phil Ringnalda 2021-04-02 02:32:04 UTC
Created attachment 119092 [details] [review]
Bug 27739: Advanced editor should use DefaultCountryField008 preference

Uses the system preference DefaultCountryField008, falling back to ||| (no
attempt to code) if it is not set, for 008/15-17 place of publication in
the advanced cataloging editor..

Test plan:
1) Apply patch and restart all the things, something's over-cached here
2) Administration - Toggle the preference  EnableAdvancedCatalogingEditor
   to "Enable", verify the preference DefaultCountryField008 is empty
3) Cataloging - Advanced editor
4) In field 008, verify that the three characters after the two sets of
   four blank spaces are |||
5) Administration - Set DefaultCountryField008 to fr
6) Cataloging - Advanced editor
7) In field 008, verify that the three characters after the two sets of
   four blank spaces are "fr " (including the space, so following
   characters haven't shifted left, and the last character is still d)
Comment 2 David Nind 2021-04-02 20:36:54 UTC
Created attachment 119146 [details] [review]
Bug 27739: Advanced editor should use DefaultCountryField008 preference

Uses the system preference DefaultCountryField008, falling back to ||| (no
attempt to code) if it is not set, for 008/15-17 place of publication in
the advanced cataloging editor..

Test plan:
1) Apply patch and restart all the things, something's over-cached here
2) Administration - Toggle the preference  EnableAdvancedCatalogingEditor
   to "Enable", verify the preference DefaultCountryField008 is empty
3) Cataloging - Advanced editor
4) In field 008, verify that the three characters after the two sets of
   four blank spaces are |||
5) Administration - Set DefaultCountryField008 to fr
6) Cataloging - Advanced editor
7) In field 008, verify that the three characters after the two sets of
   four blank spaces are "fr " (including the space, so following
   characters haven't shifted left, and the last character is still d)

Signed-off-by: David Nind <david@davidnind.com>
Comment 3 Nick Clemens 2021-04-15 19:12:14 UTC
Created attachment 119681 [details] [review]
Bug 27739: Advanced editor should use DefaultCountryField008 preference

Uses the system preference DefaultCountryField008, falling back to ||| (no
attempt to code) if it is not set, for 008/15-17 place of publication in
the advanced cataloging editor..

Test plan:
1) Apply patch and restart all the things, something's over-cached here
2) Administration - Toggle the preference  EnableAdvancedCatalogingEditor
   to "Enable", verify the preference DefaultCountryField008 is empty
3) Cataloging - Advanced editor
4) In field 008, verify that the three characters after the two sets of
   four blank spaces are |||
5) Administration - Set DefaultCountryField008 to fr
6) Cataloging - Advanced editor
7) In field 008, verify that the three characters after the two sets of
   four blank spaces are "fr " (including the space, so following
   characters haven't shifted left, and the last character is still d)

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 4 Nick Clemens 2021-04-15 19:12:59 UTC
This makes behavior match the basic cataloging editor, nice work!
Comment 5 Jonathan Druart 2021-04-16 10:29:32 UTC
Pushed to master for 21.05, thanks to everybody involved!
Comment 6 Fridolin Somers 2021-04-22 13:59:37 UTC
Pushed to 20.11.x for 20.11.05
Comment 7 Andrew Fuerste-Henry 2021-04-25 16:06:34 UTC
Pushed to 20.05.x for 20.05.11
Comment 8 Victor Grousset/tuxayo 2021-04-25 20:42:21 UTC
Not backported to oldoldstable (19.11.x). Feel free to ask if it's needed.