Bug 40508 - Set maxlength in marc21_framework_DEFAULT.yml
Summary: Set maxlength in marc21_framework_DEFAULT.yml
Status: Needs Signoff
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: Main
Hardware: All All
: P5 - low minor
Assignee: David Cook
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-07-25 02:49 UTC by David Cook
Modified: 2025-07-25 02:55 UTC (History)
0 users

See Also:
GIT URL:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 40508: Add maxlength to marc21_framework_DEFAULT.yml (1001.88 KB, patch)
2025-07-25 02:55 UTC, David Cook
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description David Cook 2025-07-25 02:49:30 UTC
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
Comment 1 David Cook 2025-07-25 02:50:56 UTC
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).
Comment 2 David Cook 2025-07-25 02:55:48 UTC
Created attachment 184610 [details] [review]
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