https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21610
--- Comment #49 from Tomás Cohen Arazi <[email protected]> --- Created attachment 84644 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=84644&action=edit Bug 21610: Fix integers and dates values at Koha::Object->store level With strict SQL modes, we are facing several issues when objects are stored. The following errors can be raised by DBIx::Class when an object does not have a valid (as defined at DB level) value: - Incorrect integer value: '' for column COLUMN - Incorrect decimal value: '' for column COLUMN - Column 'COLUMN' cannot be null - Field 'COLUMN' doesn't have a default value - Incorrect date value: '' for column 'COLUMN' We already handled some of them for Koha::Patron. As we do not want to provide such changes for all Koha::* modules we are going to fix this at Koha::Object->store level in order to provide a global fix. This is related to bug 21599 (for item types) and bug 21596 (for patrons) Test plan: - Apply first patch, run the tests => Patch fail because of the previous error in Koha::ItemType->store, to make them pass you can replace $self->notforloan(0) unless $self->notforloan; with $self->notforloan(undef) unless $self->notforloan; - Apply second patch, run the tests => They fail because of dates and/or integers values - Apply third patch, run the tests => They now pass Deep code review wanted! Signed-off-by: Kyle M Hall <[email protected]> Signed-off-by: Tomas Cohen Arazi <[email protected]> -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] http://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/
