Summary: | Can import patrons with duplicate userids | ||
---|---|---|---|
Product: | Koha | Reporter: | Owen Leonard <oleonard> |
Component: | Patrons | Assignee: | Bugs List <koha-bugs> |
Status: | CLOSED FIXED | QA Contact: | |
Severity: | major | ||
Priority: | P5 - low | CC: | gmcharlt, jonathan.druart, kyle.m.hall, mtj |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
See Also: | https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15840 | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Bug Depends on: | 1861 | ||
Bug Blocks: |
Description
Owen Leonard
2012-07-09 19:29:02 UTC
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. (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. |