[Koha-bugs] [Bug 13502] New: A bug was introduced by 1861 - meaning borrowers sometimes cant be added

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Dec 30 21:58:13 CET 2014


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 at lists.koha-community.org
          Reporter: chris at bigballofwax.co.nz
        QA Contact: testopia at bugs.koha-community.org
                CC: gmcharlt at gmail.com, kyle.m.hall at 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.


More information about the Koha-bugs mailing list