Bug 36821

Summary: Authority type text for librarians and OPAC limited to 100 characters
Product: Koha Reporter: Esther Melander <esther.melander>
Component: CatalogingAssignee: Eric Garcia <cubingguy714>
Status: Pushed to oldoldstable --- QA Contact: Testopia <testopia>
Severity: minor    
Priority: P5 - low CC: cubingguy714, fridolin.somers, lucas, m.de.rooy, phil
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
24.11.00,24.05.06,23.11.11
Circulation function:
Attachments: Bug 36821: Changed Authority Type text limit for librarians and OPAC to match database
Bug 36821: Changed Authority Type text limit for librarians and OPAC to match database

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 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 (lukeg) 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 (lukeg) 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 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
Comment 8 Lucas Gass (lukeg) 2024-11-18 17:54:08 UTC
Backported to 24.05.x for upcoming 24.05.06
Comment 9 Katrin Fischer 2024-11-22 10:09:32 UTC
This feels more like a bug than an enh to me!
Comment 10 Fridolin Somers 2024-12-06 07:55:47 UTC
Pushed to 23.11.x for 23.11.11