Bug 36821 - Authority type text for librarians and OPAC limited to 100 characters
Summary: Authority type text for librarians and OPAC limited to 100 characters
Status: Pushed to main
Alias: None
Product: Koha
Classification: Unclassified
Component: Cataloging (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Eric Garcia
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-05-09 18:01 UTC by Esther Melander
Modified: 2024-07-09 19:10 UTC (History)
4 users (show)

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


Attachments
Bug 36821: Changed Authority Type text limit for librarians and OPAC to match database (4.31 KB, patch)
2024-07-03 19:00 UTC, Eric Garcia
Details | Diff | Splinter Review
Bug 36821: Changed Authority Type text limit for librarians and OPAC to match database (4.37 KB, patch)
2024-07-03 20:14 UTC, Lucas Gass
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Esther Melander 2024-05-09 18:01:46 UTC
To Recreate

1. Go to Authority Types in Administration
2. Select Genre, Actions, Marc Structure
3. Search or find tag 090, Actions, Edit
4. Don't make any edits, just hit submit.

See the error: Please enter no more than 100 characters.

Either the hard-coded character limit needs to be expanded or the text needs to be modified to be less than 100 characters.
Comment 1 Phil Ringnalda (back in August) 2024-05-10 04:02:54 UTC
Subfields are even worse, with a maxlength of 80, when both are 255 chars in the database. And bib frameworks do the same thing, though at least there someone has trimmed all the tags (but not subfields) we ship down below the limits.

In English.

I wonder how many things in what we ship in more verbose languages can't be edited.

The maxlengths date back to the switch to Template Toolkit, so probably back to the dawn of time. No idea whether there was a display reason for it at some point, but any time we are displaying tag liblibrarian or libopac we do it on its own line, and any time we are displaying subfield descriptions, we do it wrapping long lines, or at least as code description value one line per subfield.
Comment 2 Lucas Gass 2024-07-03 17:18:24 UTC
According to the schema these can are VARCHAR 255. 

The limit is coming from HTML maxlength attribute.
Comment 3 Eric Garcia 2024-07-03 19:00:34 UTC
Created attachment 168471 [details] [review]
Bug 36821: Changed Authority Type text limit for librarians and OPAC to match database

To test:
1. Administration -> Authority Types
2. Select Genre -> Actions -> MARC Structure
3. Search or find tag 090 -> Actions -> Edit
4. Don't make any edits just hit submit
5. See the error: Please enter no more than 100 characters
6. Apply patch
7. Repeat steps 1-4
8. Notice error is gone and you can enter up to 255 characters to match database

Extra Credit:
1. Administration -> Authority Types
2. Select Genre -> Actions -> MARC Structure
3. Search or find tag 090 -> Actions -> Subfields
4. Choose any subfield -> Edit
5. Write a description for staff interface or OPAC
6. Notice you enter up to 255 characters to match database

Please enter the commit message for your changes. Lines starting
Comment 4 Lucas Gass 2024-07-03 20:14:36 UTC
Created attachment 168475 [details] [review]
Bug 36821: Changed Authority Type text limit for librarians and OPAC to match database

To test:
1. Administration -> Authority Types
2. Select Genre -> Actions -> MARC Structure
3. Search or find tag 090 -> Actions -> Edit
4. Don't make any edits just hit submit
5. See the error: Please enter no more than 100 characters
6. Apply patch
7. Repeat steps 1-4
8. Notice error is gone and you can enter up to 255 characters to match database

Extra Credit:
1. Administration -> Authority Types
2. Select Genre -> Actions -> MARC Structure
3. Search or find tag 090 -> Actions -> Subfields
4. Choose any subfield -> Edit
5. Write a description for staff interface or OPAC
6. Notice you enter up to 255 characters to match database

Please enter the commit message for your changes. Lines starting

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Comment 5 Katrin Fischer 2024-07-09 12:46:39 UTC
Picked from QA queue for push to main.
Comment 6 Katrin Fischer 2024-07-09 12:56:40 UTC
Pushed for 24.11!

Well done everyone, thank you!
Comment 7 Phil Ringnalda (back in August) 2024-07-09 19:10:55 UTC
(In reply to Phil Ringnalda from comment #1)
> And bib frameworks do the same thing

Filed bug 37293