Summary: | Set fallback for unset DefaultCountryField008 to |||, "no attempt to code" | ||
---|---|---|---|
Product: | Koha | Reporter: | Phil Ringnalda <phil> |
Component: | Cataloging | Assignee: | Phil Ringnalda <phil> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | normal | ||
Priority: | P5 - low | CC: | andrewfh, fridolin.somers, jonathan.druart, julian.maurice, m.de.rooy, martin.renvoize, victor |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: |
21.05.00,20.11.05,20.05.11
|
|
Bug Depends on: | 13912 | ||
Bug Blocks: | 27739 | ||
Attachments: |
Bug 27738: Set fallback for unset DefaultCountryField008 to |||, "no attempt to code"
Bug 27738: Set fallback for unset DefaultCountryField008 to |||, "no attempt to code" Bug 27738: Set fallback for unset DefaultCountryField008 to |||, "no attempt to code" Bug 27738: Fix wording |
Description
Phil Ringnalda
2021-02-21 17:06:43 UTC
Created attachment 117126 [details] [review] 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 ||| 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 Created attachment 117134 [details] [review] 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> Works as expected and provides a more sane default. Signing off. Created attachment 119041 [details] [review] 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> + - " Empty defaults to ||| for No attempt to code." Is the uppercase expected ("No")? 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. Created attachment 119211 [details] [review] Bug 27738: Fix wording Pushed to master for 21.05, thanks to everybody involved! Pushed to 20.11.x for 20.11.05 Pushed to 20.05.x for 20.05.11 Not backported to oldoldstable (19.11.x). Feel free to ask if it's needed. |