https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28012
David Nind <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the| |This fixes the serials new release notes| |numbering pattern input | |form so that the name and | |numbering formula fields | |are marked as required. | |Before this, there was no | |indication that these | |fields were required and | |error trace messages were | |displayed if these were not | |completed - saving a new | |pattern or editing an | |existing pattern would also | |silently fail. | | | |NOTE: | |Making the description | |field optional will be | |fixed in bug 31297. Until | |this is done, a value needs | |to be entered into this | |field - even though it | |doesn't indicate that it is | |required. CC| |[email protected] --- Comment #19 from David Nind <[email protected]> --- Testing notes (using koha-testing-docker) - I hope I got this right! Replicate the issue: 1. Go to Serials > Manage numbering patterns. 2. Add a new numbering pattern, but leave the description field blank (copy an existing numbering pattern such as Number) - note that no fields are marked as required: ==> C4::Serials::Numberpattern::AddSubscriptionNumberpattern(): DBI Exception: DBD::mysql::st execute failed: Incorrect integer value: '' for column `koha_kohadev`.`subscription_numberpatterns`.`add2` at row 1 at /kohadevbox/koha/serials/subscription-numberpatterns.pl line 70 at /usr/share/perl5/DBIx/Class/Exception.pm line 77 3. Repeat step 2 but leave the display order field blank: ==> C4::Serials::Numberpattern::AddSubscriptionNumberpattern(): DBI Exception: DBD::mysql::st execute failed: Incorrect integer value: '' for column `koha_kohadev`.`subscription_numberpatterns`.`displayorder` at row 1 at /kohadevbox/koha/serials/subscription-numberpatterns.pl line 70 at /usr/share/perl5/DBIx/Class/Exception.pm line 77 4. Repeat step 2, leaving name or numbering formula fields blank: ==> adding the new numbering pattern silently fails - you are return to the list of numbering patterns and the your new numbering pattern is not saved. 5. Fill in all the fields (name, description, numbering formula, and display order) and save: ==> C4::Serials::Numberpattern::AddSubscriptionNumberpattern(): DBI Exception: DBD::mysql::st execute failed: Incorrect integer value: '' for column `koha_kohadev`.`subscription_numberpatterns`.`add2` at row 1 at /kohadevbox/koha/serials/subscription-numberpatterns.pl line 70 at /usr/share/perl5/DBIx/Class/Exception.pm line 77 6. Edit an existing pattern with the various combinations from steps 2-5 (for example, the existing number pattern) - no fields are marked as required, you get these results: . Name: C4::Serials::Numberpattern::ModSubscriptionNumberpattern(): DBI Exception: DBD::mysql::st execute failed: Column 'label' cannot be null at /kohadevbox/koha/serials/subscription-numberpatterns.pl line 95 at /usr/share/perl5/DBIx/Class/Exception.pm line 77 . Numbering formula: C4::Serials::Numberpattern::ModSubscriptionNumberpattern(): DBI Exception: DBD::mysql::st execute failed: Column 'numberingmethod' cannot be null at /kohadevbox/koha/serials/subscription-numberpatterns.pl line 95 at /usr/share/perl5/DBIx/Class/Exception.pm line 77 . Description: C4::Serials::Numberpattern::ModSubscriptionNumberpattern(): DBI Exception: DBD::mysql::st execute failed: Column 'description' cannot be null at /kohadevbox/koha/serials/subscription-numberpatterns.pl line 95 at /usr/share/perl5/DBIx/Class/Exception.pm line 77 . Display order: can make blank or renumber This fixes the new numbering pattern input form so that the name and numbering formula fields are marked as required. Before this, there was no indication that these fields were required and error trace messages were displayed if these were not completed, and saving a new pattern or editing an existing pattern would silently fail. Notes: - The description field is not marked as required, but if you leave it blank you will get this error: C4::Serials::Numberpattern::AddSubscriptionNumberpattern(): DBI Exception: DBD::mysql::st execute failed: Column 'description' cannot be null at /kohadevbox/koha/serials/subscription-numberpatterns.pl line 73 at /usr/share/perl5/DBIx/Class/Exception.pm line 77 - Making the description field optional will be fixed in bug 31297 (see comment#15). Test plan: 1. Apply the patches. 2. Go to Serials > Manage numbering patterns. 3. Add a new numbering pattern: . Note that the name and numbering formula fields are now marked as required . If you try to save without completing any of the required fields, you will be prompted to complete these . For testing this bug, put a value in the description field (see notes above). 4. Edit an existing pattern:* . Note that the name and numbering formula fields are now marked as required . If you try to save without completing any of the required fields, you will be prompted to complete these . For testing this bug, put a value in the description field (see notes above). * No test is included for an existing numbering pattern that doesn't have a description. With the sample data included in KTD a database table update would be required to allow NULL values for the description field. -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
