Bug 16094

Summary: error editing (borrowers, reports) with mysql enterprise
Product: Koha Reporter: Humberto Blanco <hblancoca>
Component: PatronsAssignee: Bugs List <koha-bugs>
Status: RESOLVED DUPLICATE QA Contact: Testopia <testopia>
Severity: normal    
Priority: P1 - high CC: gmcharlt, hblancoca, jonathan.druart, kyle.m.hall
Version: unspecified   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13669
Change sponsored?: --- Patch complexity: ---
Who signed the patch off: Text to go in the release notes:
Version(s) released in:
Bug Depends on:    
Bug Blocks: 17258    

Description Humberto Blanco 2016-03-17 17:43:33 UTC
Hi, 

when i try to modify an user get this error

DBIx::Class::Storage::DBI::_dbh_execute(): Incorrect integer value: '' for column 'guarantorid' at row 1 at /usr/share/koha/lib/C4/Members.pm line 665

i review the sorce code 

<label for="contactname">Nombre de la instituci├│n: </label>
 [% IF ( guarantorid ) %]
 <span>[% contactname %]</span>
 <input name="contactname" id="contactname" type="hidden" size="20" value="[% contactname %]" />
 [% ELSE %]
 <input name="contactname" id="contactname" type="text" size="20" value="[% contactname %]" />
 [% END %]

but when do not exist guarantor, how can i apply 0 (i think)? 

thansk for your help.
Comment 1 Jonathan Druart 2016-03-21 15:41:26 UTC
I don't understand, are you trying to edit a patron using the Koha interface or the mysql cli?
If you want to insert/update a patron using the mysql cli, you need to specify guarantorid=NULL
Comment 2 Humberto Blanco 2016-03-28 15:23:08 UTC
Hi Jonathan, 
This errors happend using the Koha interface, occurs when we are testing the koha database in mysql enterprise. Nothing happend in mysql community version.
Comment 3 Jonathan Druart 2016-03-29 07:44:24 UTC
Try disabling STRICT_TRANS_TABLES in your MySQL config file.
Comment 4 Humberto Blanco 2016-03-31 20:27:39 UTC
Jonathan, 
disabling those parameters do not work. Now the variable name sql_mode is empty but the error is the same.

I modify the database structure for some of those errors,   from example in addorder.pl when creating appear the following error:
DBIx::Class::Storage::DBI::_dbh_execute(): Field "budget_group_id" doesn┬┤t have a default value at /usr/share/koha/lib/....

In mysql community i dont have those error but yes in enterprise.then i modify the database structure.

ALTER TABLE aqorders ALTER COLUMN budgetgroup_id  SET DEFAULT 0;

I believe that is needle put this in the update database scripts.

Best regards!
Comment 5 Jonathan Druart 2016-09-06 09:50:20 UTC

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