If you use the "import patrons" tool to upload a CSV file of patron records it is possible to create more than one patron with the same userid. This should not be possible.
I also ran into this in the past. Linking to bug 1861.
Bumping severity on this, it's still a problem in current master. What I did was: ./misc/export_borrowers.pl -H -f borrowernumber -f cardnumber -f surname -f firstname -f categorycode -f dateenrolled -f expirydate -f sort1 -f sort2 -f sex -f branchcode >path/to/your/file.txt Then I changed the file to add ,userid to the header and ,username to each of the patrons. The file reimported and updated patrons without any error. All patrons now have the same userid.
Should have been fixed by bug 1861.
(In reply to Owen Leonard from comment #0) > If you use the "import patrons" tool to upload a CSV file of patron records > it is possible to create more than one patron with the same userid. This > should not be possible. I also hit this bug today, when attempting to import/update patrons with undefined ("") userids
(In reply to Mason James from comment #4) > (In reply to Owen Leonard from comment #0) > > If you use the "import patrons" tool to upload a CSV file of patron records > > it is possible to create more than one patron with the same userid. This > > should not be possible. > > I also hit this bug today, when attempting to import/update patrons with > undefined ("") userids Which versions? Do you have the unique key defined? (see bug 1861).
(In reply to Mason James from comment #4) > (In reply to Owen Leonard from comment #0) > > If you use the "import patrons" tool to upload a CSV file of patron records > > it is possible to create more than one patron with the same userid. This > > should not be possible. > > I also hit this bug today, when attempting to import/update patrons with > undefined ("") userids i logged a new bug, as it is a little different from this one https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15840
(In reply to Jonathan Druart from comment #5) > (In reply to Mason James from comment #4) > > (In reply to Owen Leonard from comment #0) > > > If you use the "import patrons" tool to upload a CSV file of patron records > > > it is possible to create more than one patron with the same userid. This > > > should not be possible. > > > > I also hit this bug today, when attempting to import/update patrons with > > undefined ("") userids > > Which versions? Do you have the unique key defined? (see bug 1861). version 3.18.9 to master in my situation the unique key is '', which is a valid value hey?
I haven't seen this problem in recent vresions - maybe there is a twist to it. We have seen errors where users haven't been imported because the userid in the file was already in the database. - So that appears to be checked correctly. Also when the same userid was listed twice in one import file, only the first would be imported.
(In reply to Owen Leonard from comment #0) > If you use the "import patrons" tool to upload a CSV file of patron records > it is possible to create more than one patron with the same userid. This > should not be possible. I've confirmed that it's no longer possible to import duped useres, however the import tool now dies in some conditions see bug 15840 for details
(In reply to Katrin Fischer from comment #8) > I haven't seen this problem in recent vresions - maybe there is a twist to > it. > We have seen errors where users haven't been imported because the userid in > the file was already in the database. - So that appears to be checked > correctly. Also when the same userid was listed twice in one import file, > only the first would be imported. i think the twist is that the bug is triggered when using the 'overwrite' import option, rather than 'ignore/skip'
Maybe it's some change since 3.18.x that we are using - because iirc that was with overwrite.