[Bug 16426] New: Import borrowers tool warns for blank and/or existing userids
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16426 Bug ID: 16426 Summary: Import borrowers tool warns for blank and/or existing userids Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: major Priority: P5 - low Component: Tools Assignee: gmcharlt@gmail.com Reporter: nick@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org Bug 15840 added warns for existing userids, however these warning are now triggering when borrowers are imported with: 1 - no userid 2 - existing userids even if they belong to the matching user To recreate: Find a borrower with a userid in your system Create an import file with that patron and a new patron with no user id Try to import and match on userid Errors are generated and no patrons are updated or imported Added comments From IRC: <wizzyrea> if there is no userid, we should ignore it. <wizzyrea> or optionally create one -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16426 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P5 - low |P3 CC| |nick@bywatersolutions.com, | |wizzyrea@gmail.com See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=15840 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16426 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de --- Comment #1 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Agreed, no userid in the import file should be ignored. Sorry to have missed this in testing! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16426 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16426 --- Comment #2 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 51123 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=51123&action=edit Bug 16426: Add tests for ModMember - do not update userid -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16426 --- Comment #3 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 51124 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=51124&action=edit Bug 16426: follow-up of bug 15840 - correctly manage userid while inserting patrons Bug 15840 tried to fix a bug but makes things more complicated than it was before. If an userid is not provided for 1 or more rows of the csv file, it should not be updated. However, if a userid is provided and it already used by an other patron, the import should fail for this row (but not crash!). Test plan: 0/ Create a patron with a userid=your_userid 1/ Use the import patron tool to update this userid => userid should have been updated 2/ Update another data and do not provide the userid => data should have been updated and not the userid 3/ Update another data and provide the userid, but set it to an empty string, or '0' => data should have been updated and not the userid 4/ Update another patron, and set userid=your_userid => Update should fail and an error whouls be displayed ("already used by another patron") -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16426 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|gmcharlt@gmail.com |jonathan.druart@bugs.koha-c | |ommunity.org CC| |jonathan.druart@bugs.koha-c | |ommunity.org --- Comment #4 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Important note: this patch assumes that borrowers.userid should not be undef, 0, or ''. If everybody agrees with that, we will have to add an updatedb entry to check if there are no rows in the DB matching that, otherwise an update of a patron without userid will fail. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16426 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |15840 See Also|https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=15840 | Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15840 [Bug 15840] Import borrowers tool explodes if userid already exists -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16426 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=12598 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16426 --- Comment #5 from Nick Clemens <nick@bywatersolutions.com> --- This seems to be working well, two questions: 1 - If I am matching on userid, and import a patron with no userid in the file but the cardnumber is already used the warning says "Cardnumber ###### is not a valid cardnumber" It would be clearer if it said 'this cardnumber is already used' 2 - If I am mathching on cardnumber and include an existing username in the file I am not warned, but the username is replaced with a generated one (surname.firstname) - I think there should be a warning since the udername doesn't match the submitted data, or that line should fail -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16426 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16426 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #51123|0 |1 is obsolete| | --- Comment #6 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 51147 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=51147&action=edit Bug 16426: Add tests for ModMember - do not update userid Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16426 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #51124|0 |1 is obsolete| | --- Comment #7 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 51148 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=51148&action=edit Bug 16426: follow-up of bug 15840 - correctly manage userid while inserting patrons Bug 15840 tried to fix a bug but makes things more complicated than it was before. If an userid is not provided for 1 or more rows of the csv file, it should not be updated. However, if a userid is provided and it already used by an other patron, the import should fail for this row (but not crash!). Test plan: 0/ Create a patron with a userid=your_userid 1/ Use the import patron tool to update this userid => userid should have been updated 2/ Update another data and do not provide the userid => data should have been updated and not the userid 3/ Update another data and provide the userid, but set it to an empty string, or '0' => data should have been updated and not the userid 4/ Update another patron, and set userid=your_userid => Update should fail and an error whouls be displayed ("already used by another patron") Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16426 --- Comment #8 from Nick Clemens <nick@bywatersolutions.com> --- (In reply to Nick Clemens from comment #5)
This seems to be working well, two questions: moving these to separate bug reports as they were present before 15840
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16433 https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16434 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16426 --- Comment #9 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 51274 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=51274&action=edit k -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16426 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16426 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #51147|0 |1 is obsolete| | Attachment #51148|0 |1 is obsolete| | Attachment #51274|0 |1 is obsolete| | --- Comment #10 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 51275 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=51275&action=edit [PASSED QA] Bug 16426: Add tests for ModMember - do not update userid Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16426 --- Comment #11 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 51276 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=51276&action=edit [PASSED QA] Bug 16426: follow-up of bug 15840 - correctly manage userid while inserting patrons Bug 15840 tried to fix a bug but makes things more complicated than it was before. If an userid is not provided for 1 or more rows of the csv file, it should not be updated. However, if a userid is provided and it already used by an other patron, the import should fail for this row (but not crash!). Test plan: 0/ Create a patron with a userid=your_userid 1/ Use the import patron tool to update this userid => userid should have been updated 2/ Update another data and do not provide the userid => data should have been updated and not the userid 3/ Update another data and provide the userid, but set it to an empty string, or '0' => data should have been updated and not the userid 4/ Update another patron, and set userid=your_userid => Update should fail and an error whouls be displayed ("already used by another patron") Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16426 Brendan Gallagher <brendan@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |brendan@bywatersolutions.co | |m --- Comment #12 from Brendan Gallagher <brendan@bywatersolutions.com> --- Pushed To Master - Should be in the May 2016 Release. Thanks! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16426 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable CC| |julian.maurice@biblibre.com --- Comment #13 from Julian Maurice <julian.maurice@biblibre.com> --- Patch pushed to 3.22.x, will be in 3.22.7 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16426 Florent Mara <florent.mara@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |florent.mara@gmail.com --- Comment #14 from Florent Mara <florent.mara@gmail.com> --- While rebasing bug 12598, I backported this patch and it broke my tests. (unless I missed something) With this patch, either overwrite_cardnumber is set to 0 and the duplicate borrower number will be caught as an 'already_in_db' feedback - before reaching the new code and get to the next input line. OR overwrite_cardnumber is set to 1 and duplicates are overwritten anyway. In other words, there does not appear to be any duplicate userid check anymore with the current code. In bug 12598, I relocated the new code block above 'if ($borrowernumber) {' to restore functionality. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16426 Craig Dean <craig@dean.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |craig@dean.net.nz --- Comment #15 from Craig Dean <craig@dean.net.nz> --- I have a customer affected by this bug and thus can't import any new users. Looking at the previous releases it seems that 3.22.7 won't be out until closer to the end of the month. This is not really an acceptable wait to be able to provision new users. 1. Is there any chance that the 3.22.7 will be released sooner? 2. Is there anything I can do to import this patch now, without breaking future updates. Given then I am a Systems Administrator and not a developer. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16426 --- Comment #16 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- If you are importing new borrowers it will will help to add a userid column with some unique key to your import file - for example the cardnumber or something similar. That will let you import the data. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16426 --- Comment #17 from Craig Dean <craig@dean.net.nz> --- (In reply to Katrin Fischer from comment #16)
If you are importing new borrowers it will will help to add a userid column with some unique key to your import file - for example the cardnumber or something similar. That will let you import the data.
Unfortunately that did not work. It does not matter what I put in the userid column it will not import the users. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16426 --- Comment #18 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Hm it worked for us - are you still seeing the issue or did you update Koha since? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16426 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |chris@bigballofwax.co.nz --- Comment #19 from Chris Cormack <chris@bigballofwax.co.nz> --- Pushed to 3.20.x will be in 3.20.11 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org