[Bug 40508] New: Set maxlength in marc21_framework_DEFAULT.yml
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40508 Bug ID: 40508 Summary: Set maxlength in marc21_framework_DEFAULT.yml Change sponsored?: --- Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: minor Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: koha-bugs@lists.koha-community.org Reporter: dcook@prosentient.com.au QA Contact: testopia@bugs.koha-community.org By explicitly setting maxlength in marc21_framework_DEFAULT.yml, we can change the default maxlength for fields in the default framework (and to a degree the ACQ framework). See Bug 40471 -- 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=40508 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |dcook@prosentient.com.au |ity.org | --- Comment #1 from David Cook <dcook@prosentient.com.au> --- The following patch uses the default 9999 for all fields except for the 000, 008, and 952$p. 000 and 008 use 24 and 40 respectively (which is set by the "sql_statements" at the bottom of the YAML file anyway. We set 952$p to 20 as that's the limit on the barcode field (as per bug 40471). -- 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=40508 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=40509 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40508 David Cook <dcook@prosentient.com.au> 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=40508 --- Comment #2 from David Cook <dcook@prosentient.com.au> --- Created attachment 184610 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=184610&action=edit Bug 40508: Add maxlength to marc21_framework_DEFAULT.yml This patch adds maxlength to marc21_framework_DEFAULT.yml. It uses the default of 9999 for most subfields except 000, 008, and 952$p. The 000 and 008 use 24 and 40 respectively, although this is already enforced by the sql_statements at the end of the file. The 952$p is set to 20, since the barcode DB field has a length of 20. Test plan: 0. Apply the patch 1. Take down KTD 2. Bring up KTD 3. Look at the 000, 008, and 952 fields in the default framework 4. Note that 000 uses maxlength 24, 008 uses maxlength 40, 952$p uses maxlength 20, and every other subfield uses 9999 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40508 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=40471 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40508 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |40497 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40497 [Bug 40497] Item add form does not respect framework maxlength setting -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40508 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #184610|0 |1 is obsolete| | --- Comment #3 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 184743 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=184743&action=edit Bug 40508: Add maxlength to marc21_framework_DEFAULT.yml This patch adds maxlength to marc21_framework_DEFAULT.yml. It uses the default of 9999 for most subfields except 000, 008, and 952$p. The 000 and 008 use 24 and 40 respectively, although this is already enforced by the sql_statements at the end of the file. The 952$p is set to 20, since the barcode DB field has a length of 20. Test plan: 0. Apply the patch 1. Take down KTD 2. Bring up KTD 3. Look at the 000, 008, and 952 fields in the default framework 4. Note that 000 uses maxlength 24, 008 uses maxlength 40, 952$p uses maxlength 20, and every other subfield uses 9999 Signed-off-by: Owen Leonard <oleonard@myacpl.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40508 --- Comment #4 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 184744 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=184744&action=edit Bug 40508: (follow-up) Update more item field maxlengths - 2 - Source of classification or shelving scheme - 8 - Collection - a - Home library - b - Current library - c - Shelving location - f - Coded location qualifier - i - Inventory number - o - Full call number - t - Copy number - y - Koha item type -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40508 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40508 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #184743|0 |1 is obsolete| | --- Comment #5 from David Nind <david@davidnind.com> --- Created attachment 184763 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=184763&action=edit Bug 40508: Add maxlength to marc21_framework_DEFAULT.yml This patch adds maxlength to marc21_framework_DEFAULT.yml. It uses the default of 9999 for most subfields except 000, 008, and 952$p. The 000 and 008 use 24 and 40 respectively, although this is already enforced by the sql_statements at the end of the file. The 952$p is set to 20, since the barcode DB field has a length of 20. Test plan: 0. Apply the patch 1. Take down KTD 2. Bring up KTD 3. Look at the 000, 008, and 952 fields in the default framework 4. Note that 000 uses maxlength 24, 008 uses maxlength 40, 952$p uses maxlength 20, and every other subfield uses 9999 Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40508 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #184744|0 |1 is obsolete| | --- Comment #6 from David Nind <david@davidnind.com> --- Created attachment 184764 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=184764&action=edit Bug 40508: (follow-up) Update more item field maxlengths - 2 - Source of classification or shelving scheme - 8 - Collection - a - Home library - b - Current library - c - Shelving location - f - Coded location qualifier - i - Inventory number - o - Full call number - t - Copy number - y - Koha item type Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40508 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com Text to go in the| |This explicitly sets the release notes| |"Max length" (maxlength) | |for MARC21 subfields in the | |default framework. Most | |subfields are set by | |default to 9999, except as | |follows: | |- 000 (Leader - fixed | |length control field): 24 - | |existing value | |- 008 (Fixed-length data | |elements--general | |information - fixed length | |control field)): 40 - | |existing value | |- 952$2 (Source of | |classification or shelving | |scheme): 10 | |- 952$8 (Collection): 80 | |- 952$a (Home library): 10 | |- 952$b (Current library): | |10 | |- 952$c (Shelving | |location): 80 | |- 952$f (Coded location | |qualifier): 10 | |- 952$i (Inventory number): | |80 | |- 952$o (Full call number): | |255 | |- 952$p (Barcode): 20 - the | |limit on the barcode field | |- 952$t (Copy number): 32 | |- 952$y (Koha item type): | |10 | | | |Note: This change only | |applies for new | |installations, existing | |installations will need to | |manually change their | |frameworks. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40508 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.de.rooy@rijksmuseum.nl Status|Signed Off |Failed QA --- Comment #7 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Please see also bug 40284. For fields 005, 006 and 007. We are touching the same file. Setting the length to 9999 is definitely wrong. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40508 --- Comment #8 from Owen Leonard <oleonard@myacpl.org> --- (In reply to Marcel de Rooy from comment #7)
Setting the length to 9999 is definitely wrong.
9999 is the default found in the code, for example: authorities.pl line 104: # determine maximum length; 9999 bytes per ISO 2709 except for leader and MARC21 008 my $max_length = 9999; -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40508 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off --- Comment #9 from David Cook <dcook@prosentient.com.au> --- (In reply to Owen Leonard from comment #8)
(In reply to Marcel de Rooy from comment #7)
Setting the length to 9999 is definitely wrong.
9999 is the default found in the code, for example:
authorities.pl line 104:
# determine maximum length; 9999 bytes per ISO 2709 except for leader and MARC21 008 my $max_length = 9999;
Changing this one back to "Signed Off", because bug 40284 and bug 40508 are not mutually exclusive. We can add a follow-up here to make the marc21_framework_DEFAULT.yml change from bug 40284 unnecessary, or we can just include them both. It doesn't really matter. If both are pushed, then the right thing will happen in the end. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40508 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=40284 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40508 --- Comment #10 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- For clarity, a length of 9999 for field 005-007 is definitely wrong. See LOC. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40508 --- Comment #11 from David Cook <dcook@prosentient.com.au> --- (In reply to Marcel de Rooy from comment #10)
For clarity, a length of 9999 for field 005-007 is definitely wrong. See LOC.
No one is arguing with you about that. What Owen is saying is that Koha's default for those fields is already 9999. The patch - for the most part - is just reflecting the status quo. Happy for you to add follow-ups like Owen did for the item fields. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40508 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |In Discussion CC| |jonathan.druart@gmail.com --- Comment #12 from Jonathan Druart <jonathan.druart@gmail.com> --- 1. Shouldn't we then remove the UPDATE statements at the end of the file? 2. How do we ensure we keep them up-to-date with the DB schema? 3. Why those fields and not all (eg. all those linked with AVs) ? IMO we need a test that will search for MARC subfields linked with a DB column (Koha link or AV) and make sure the maxlength is correct. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40508 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |andrew@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org