Bug 33678

Summary: Saving new numbering pattern crashes on missing description
Product: Koha Reporter: Marcel de Rooy <m.de.rooy>
Component: SerialsAssignee: Bugs List <koha-bugs>
Status: RESOLVED DUPLICATE QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: jonathan.druart
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32392
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:

Description Marcel de Rooy 2023-05-04 13:12:50 UTC
Save as new pattern generates a 500 when I change advanced pattern and save

GET
https://SERVER/cgi-bin/koha/serials/create-numberpattern.pl?patternname=vol_no_week&numberingmethod=Vol. {X}, No. {Y}&label1=Volume&label2=Number&add1=1&add2=1&every1=12&every2=1&setto1=1&setto2=1&whenmorethan1=99999&whenmorethan2=52
[HTTP/1.1 500 Internal Server Error 64ms]

C4::Serials::Numberpattern::AddSubscriptionNumberpattern(): DBI Exception: DBD::mysql::st execute failed: Field 'description' doesn't have a default value at /usr/share/koha/serials/create-numberpattern.pl line 58
 at /usr/share/perl5/DBIx/Class/Exception.pm line 77
    DBIx::Class::Exception::throw('DBIx::Class::Exception', 'DBI Exception: DBD::mysql::st execute failed: Field \'description\' doesn\'t have a default value', 0) called at /usr/share/perl5/DBIx/Class/Schema.pm line 1118

Keywords for searching:
​saveAdvancedPattern
#saveadvancedpatternbutton

Reproduce by changing number pattern of saved subscription and trying to Save the new numbering pattern. This is an ajax call. You see 500 in the console.
Comment 1 Jonathan Druart 2023-05-16 09:31:45 UTC

*** This bug has been marked as a duplicate of bug 28012 ***