[Bug 27738] New: Fix fallback for unset DefaultCountryField008 system preference
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27738 Bug ID: 27738 Summary: Fix fallback for unset DefaultCountryField008 system preference Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Cataloging Assignee: koha-bugs@lists.koha-community.org Reporter: phil@chetcolibrary.org QA Contact: testopia@bugs.koha-community.org CC: m.de.rooy@rijksmuseum.nl Depends on: 13912 Bug 13912 added DefaultCountryField008 to allow defaulting the place of publication to something other than the previous default of xxu ("somewhere in the United States, but I don't know what state"). Trying to follow the Koha Way of never changing existing behavior, only adding a preference to fix it, it intended to fall back to xxu, but https://git.koha-community.org/gitweb/?p=koha.git;a=blob;f=cataloguing/value... thought the preference would be undefined if it wasn't set, and then a QA followup updated the DB to add it so it's always defined, and the // "xxu" is unreached and the default value of the pref, '', gets space-padded to three characters long, ' '. Since we've now gone 3.3 years with the default having switched from the unfortunate choice of 'xxu' to the invalid ' ' without anyone filing a bug about it, I assert that the Koha Way is wrong in this case, that nobody actually wanted to retain the behavior of defaulting to saying that every book was published in an unknown US state (or if they did exist, they already fixed it by using that as their DefaultCountryField008), and we can fix the bug of defaulting to an invalid value by choosing a new default when DefaultCountryField008 isn't set, the value "|||" which is "no attempt to code" which is precisely the case when the cataloger doesn't change it and the system adminstrator doesn't say it should have a particular value whether or not that value is correct. Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13912 [Bug 13912] Add syspref for default place of publication (country code) for field 008, range 15-17 -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27738 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Fix fallback for unset |Set fallback for unset |DefaultCountryField008 |DefaultCountryField008 to |system preference ||||, "no attempt to code" -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27738 Phil Ringnalda <phil@chetcolibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |27739 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27739 [Bug 27739] Advanced editor should use DefaultCountryField008 system preference rather than hardcoding xxu -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27738 Phil Ringnalda <phil@chetcolibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |phil@chetcolibrary.org |ity.org | -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27738 Phil Ringnalda <phil@chetcolibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27738 --- Comment #1 from Phil Ringnalda <phil@chetcolibrary.org> --- Created attachment 117126 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=117126&action=edit 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 ||| -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27738 --- Comment #2 from Phil Ringnalda <phil@chetcolibrary.org> --- Bah, forgot the last two steps, 6. Set DefaultCountryField008 to abc 7. Repeat steps 2-3 and verify that the value for 15-17 is abc -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27738 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #117126|0 |1 is obsolete| | --- Comment #3 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 117134 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=117134&action=edit 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> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27738 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off CC| |martin.renvoize@ptfs-europe | |.com --- Comment #4 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Works as expected and provides a more sane default. Signing off. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27738 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #117134|0 |1 is obsolete| | --- Comment #5 from Julian Maurice <julian.maurice@biblibre.com> --- Created attachment 119041 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=119041&action=edit 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> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27738 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA CC| |julian.maurice@biblibre.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27738 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org --- Comment #6 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- + - " Empty defaults to ||| for No attempt to code." Is the uppercase expected ("No")? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27738 --- Comment #7 from Phil Ringnalda <phil@chetcolibrary.org> --- Fun question! To me, it's clearly a quote of the formal description of the fill character from the spec, where no is always capitalized. However, when I went looking for an example in the spec, I realized that the spec editors very carefully duck the question: they'll use the actual term from descriptions when it is at the start of a sentence, but otherwise they'll use other phrases like "when no attempt has been made to code." The single example of using the actual term I found in the 008 spec was 15-17 - Place of publication, production, or execution Two- or three-character alphabetic code that indicates the place of publication, production, or execution. which argues that I'm wrong. Perhaps " Empty defaults to ||| - No attempt to code." (which is a copy-paste from the spec, including the dash) would be more correct, but I'd be just as happy with a lowercase no. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27738 --- Comment #8 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 119211 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=119211&action=edit Bug 27738: Fix wording -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27738 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |21.05.00 released in| | Status|Passed QA |Pushed to master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27738 --- Comment #9 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Pushed to master for 21.05, thanks to everybody involved! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27738 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|21.05.00 |21.05.00,20.11.05 released in| | CC| |fridolin.somers@biblibre.co | |m Status|Pushed to master |Pushed to stable --- Comment #10 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to 20.11.x for 20.11.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27738 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |Pushed to oldstable CC| |andrew@bywatersolutions.com Version(s)|21.05.00,20.11.05 |21.05.00,20.11.05,20.05.11 released in| | --- Comment #11 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Pushed to 20.05.x for 20.05.11 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27738 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |victor@tuxayo.net Status|Pushed to oldstable |RESOLVED Resolution|--- |FIXED --- Comment #12 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Not backported to oldoldstable (19.11.x). Feel free to ask if it's needed. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org