Bug 35878

Summary: serial.publisheddatetext should allow for more than varchar(100)
Product: Koha Reporter: Lucas Gass (lukeg) <lucas>
Component: SerialsAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low    
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:

Description Lucas Gass (lukeg) 2024-01-23 19:05:10 UTC
With Bug 33039 you can define a template for serial.publisheddatetext. It can be pretty easy to go over 100 characters and cause errors.

To recreate: 
1 Create or edit a new subscription
2 Edit the "Publication date template" adding something like: 

[% USE KohaDates %]
Serial seq.: [% serialseq %]
Serial seq. X:[% serialseq_x %] 
Serial seq. Y:[% serialseq_y %] 
Serial seq. Z:[% serialseq_z %] 
Subscription ID:[% subscriptionid %] 
Biblionumber: [% biblionumber %] 
Status: [% status %] 
Planned date: [% planneddate | $KohaDates %] 
Published date: [% publisheddate | $KohaDates %] 
Notes: [% notes %] 
Routing notes: [% routingnotes %] 


3 Generate the next serial and see the error:

DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::mysql::st execute failed: Data too long for column 'publisheddatetext' at row 1 at /kohadevbox/koha/Koha/Object.pm line 170
 at /usr/share/perl5/DBIx/Class/Exception.pm line 77