http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13502 Bug ID: 13502 Summary: A bug was introduced by 1861 - meaning borrowers sometimes cant be added Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Patrons Assignee: koha-bugs@lists.koha-community.org Reporter: chris@bigballofwax.co.nz QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle.m.hall@gmail.com Bug 1861 introduces some changes, Which is breaking some tests, and might break functional code also. DBD::mysql::st execute failed: Duplicate entry '' for key 'userid' at /srv/jenkins/workspace/Koha_3.18.x_U14/C4/SQLHelper.pm line 184. etc. This is caused by my $borrowernumber1 = AddMember(categorycode => $categorycode, branchcode => $branchcode); And then in the AddMember sub we do $data{'userid'} = Generate_Userid( $data{'borrowernumber'}, $data{'firstname'}, $data{'surname'} ) if ( $data{'userid'} eq '' || !Check_Userid( $data{'userid'} ) ); The problem here is if $data{'userid'} is undef the if fails and we don't create a new userid. ANd since the changes in bug 1861 make this column unique everything ASPLODES! -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.