[Koha-bugs] [Bug 15840] Import borrowers tool explodes if userid already exists

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Feb 18 11:56:47 CET 2016


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15840

--- Comment #12 from Jonathan Druart <jonathan.druart at bugs.koha-community.org> ---
Created attachment 48205
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=48205&action=edit
Bug 15840: Catch errors if userid already exists when importing patrons

Import borrowers tool explodes if userid already exists. This error
should be caught to avoid the script to explodes.

Test plan:
Import a csv file with the same userid used
Without this patch, you will get a DBIx::class exception "Duplicate
entry ' for key 'userid'"
With this patch applied, these patrons won't be inserted but an error
will be nicely displayed in the error list.

Note that it would be easy to insert the patrons anyway and generate a
userid based on the surname and firstname.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list