Bug 40497 - Item add form does not respect framework maxlength setting
Summary: Item add form does not respect framework maxlength setting
Status: Needs Signoff
Alias: None
Product: Koha
Classification: Unclassified
Component: Cataloging (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-07-24 15:57 UTC by Owen Leonard
Modified: 2025-07-24 16:25 UTC (History)
1 user (show)

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


Attachments
Bug 40497: Item add form does not respect framework maxlength setting (5.51 KB, patch)
2025-07-24 16:25 UTC, Owen Leonard
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Owen Leonard 2025-07-24 15:57:54 UTC
The item add form uses the wrong template variable to set the maxlength attribute on a text input field.
Comment 1 Owen Leonard 2025-07-24 16:25:47 UTC
Created attachment 184598 [details] [review]
Bug 40497: Item add form does not respect framework maxlength setting

This patch corrects the template variable which populates the maxlenth
attribute on text fields in the add/edit item form.

To test, apply the patch and go Administratoin -> MARC bibliographic
frameworks -> (framework) -> Tag 952 -> Edit subfields.

- Click the "p" tab and set the "Max length" field to "20"
- Save the framework and go to Cataloging.
- Locate a bibliographic record that uses the framework you edited.
- Add or edit an item on that bibliographic record.
- Check the "Barcode" field. The input tag should limit your entry to 20
  characters.

Sponsored-by: Athens County Public Libraries