]> git.koha-community.org Git - koha.git/commit
Bug 21599: Fix item type creation by defining default values
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 18 Oct 2018 11:32:59 +0000 (08:32 -0300)
committerFridolin Somers <fridolin.somers@biblibre.com>
Fri, 9 Nov 2018 15:21:06 +0000 (16:21 +0100)
commit878627b61e44615eb666c38d851fdd6db2410373
tree31bc85413a3bdba932ba104d3cc056ae6d8750e9
parentbc54704cd65b06639a1fbfb222b873f2d2fdd35b
Bug 21599: Fix item type creation by defining default values

Same as what we have in Koha::Patron->new, empty strings should not be
inserted in integer or date column type

DBD::mysql::st execute failed: Incorrect decimal value: '' for column 'defaultreplacecost' at row 1 [for Statement "INSERT INTO `itemtypes` ( `checkinmsg`, `checkinmsgtype`, `defaultreplacecost`, `description`, `hideinopac`, `imageurl`, `itemtype`, `notforloan`, `processfee`, `rentalcharge`, `searchcategory`, `sip_media_type`, `summary`) VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )" with ParamValues: 0="", 1="message", 2="", 3="xx", 4=0, 5='', 6="XX", 7=0, 8="", 9="", 10="", 11=undef, 12=""] at /usr/share/perl5/DBIx/Class/Storage/DBI.pm line 1832.

Test plan:
Create a new itemtype

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 33c142ba3b7cfd37dd90569de2a5802849b09ef5)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 6c2eeaa43443e0591eebbf00f48dacfff005b647)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Koha/ItemType.pm