A while back the import_borrowers script was altered to allow matching by userid, to allow updating borrowers by the id, unfortunately in parallel was a change to ensure duplicate userids were not added. Both changes were applied but the latter had the side effect of rendering the first useless. This patch adds a test that we are not matching on userid to the check userid for uniqueness To test Without the patch a import record matching on userid will be rejected With the patch it will update the db record when matching on another key non-unique userids will still be rejected a version of the patch has been submitted for inclusion in the enhanced version of patron load in bug 12598
Created attachment 65828 [details] [review] Add test to not reject update if matching on userid test by confirming that if matching by userid a matched record is updated, howver if matching by another criteria a record with a duplicate userid should still be rejected
Hi Colin, with and without the patch I receive an internal server error when I try to match on username/uderid: Use of uninitialized value $uploadborrowers in concatenation (.) or string at /home/vagrant/kohaclone/tools/import_borrowers.pl line 113. Use of uninitialized value $uploadborrowers in concatenation (.) or string at /home/vagrant/kohaclone/tools/import_borrowers.pl line 113. Can't call method "unblessed" on unblessed reference at /home/vagrant/kohaclone/tools/import_borrowers.pl line 255, <$fh> line 2. Can you help?
(In reply to Katrin Fischer from comment #2) > Hi Colin, with and without the patch I receive an internal server error when > I try to match on username/uderid: > > Use of uninitialized value $uploadborrowers in concatenation (.) or string > at /home/vagrant/kohaclone/tools/import_borrowers.pl line 113. > Use of uninitialized value $uploadborrowers in concatenation (.) or string > at /home/vagrant/kohaclone/tools/import_borrowers.pl line 113. > Can't call method "unblessed" on unblessed reference at > /home/vagrant/kohaclone/tools/import_borrowers.pl line 255, <$fh> line 2. > > Can you help? Should be fixed by commit 6f595e4c95c22ba444f49c61c9d101483309871f Bug 17829: (follow-up) Fix import patron
Hi Colin, after Jonathan's fix the update using userid for matching works for me without the patch. Can you verify?
Closing, reopen if it is still needed.