[Bug 21465] New: Overlaying with Patron Imports cannot be done if user id and cardnumber are the same.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21465 Bug ID: 21465 Summary: Overlaying with Patron Imports cannot be done if user id and cardnumber are the same. Change sponsored?: --- Product: Koha Version: 18.05 Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Tools Assignee: koha-bugs@lists.koha-community.org Reporter: kelly@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org In the Koha version of 18.05 using the patron import tool, if a patron has the same userid and cardnumber, and a library attempts of overlaying an updated file on patron information into Koha, an error will occur. Test Plan 1. Create patron csv according to the download starter CSV in Koha. 2. Patrons were assigned a card number by the library and this card number was also used for their User ID. 3. Import the Patron CSV into Koha. 4. Adjust this same Patron CSV file adding/updating an address, adding/updating a field of data. 5. Use this new file to import into Koha 6 Choose to match on the cardnumber 7. Choose to overwrite the existing one with this file. 8. Koha will produce an error saying that the userid already in use by another patron. Different Scenario Do Steps 1-5 the same 6. Choose to match on the User Id 7. Choose to overwrite the existing one with this file. 8. Koha will do the overwrite correctly. Libraries do tend to give patrons a cardnumber and also use that as the patron's userid. It would appear that matching on the userid works, however, this should not work this way, it should be able to match on either and produce same results- a successful overlay. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21465 Jessie Zairo <jzairo@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jzairo@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21465 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Overlaying with Patron |Cannot overlay patrons when |Imports cannot be done if |matching by cardnumber if |user id and cardnumber are |userid exists in file and |the same. |in Koha Version|18.05 |master CC| |nick@bywatersolutions.com --- Comment #1 from Nick Clemens <nick@bywatersolutions.com> --- This appears to have been intentional according to tests, but I think the tests and assumption were wrong. Essentially if not matching by userid and a userid is inthe file we try to create a new user and see if the user id is valid. It isn't, of course, because the patron exists. has_valid_userid is supposed to ignore a duplicate for the existing borrower, but we avoid that check by creating a new borrower!?!? Patch coming -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21465 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21465 --- Comment #2 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 79850 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=79850&action=edit Bug 21465: Don't throw duplicate userid error if userid belongs to the matched patron To test: 1 - Export your patrons a - Create a report 'SELECT * FROM borrowers' b - Run and save the report as csv (check your delimiter) c - Delete the borrowernumebr column 2 - Use the Patron Import tool to import the csv from above 3 - Set matching to 'cardnumber' 4 - Set 'If matching record is already in the borrowers table:' to Overwrite 5 - Import 6 - None are import because of matchign userid (their own) 7 - Apply patch 8 - Repeat 9 - Patrons are successfully overwritten 10 - prove -v t/db_dependent/Koha/Patrons/Import.t 11 - prove -v t/db_dependent/Koha/Patrons.t -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21465 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Patch doesn't apply CC| |kyle@bywatersolutions.com -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21465 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Needs Signoff -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21465 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #79850|0 |1 is obsolete| | --- Comment #3 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 79908 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=79908&action=edit Bug 21465: Don't throw duplicate userid error if userid belongs to the matched patron To test: 1 - Export your patrons a - Create a report 'SELECT * FROM borrowers' b - Run and save the report as csv (check your delimiter) c - Delete the borrowernumebr column 2 - Use the Patron Import tool to import the csv from above 3 - Set matching to 'cardnumber' 4 - Set 'If matching record is already in the borrowers table:' to Overwrite 5 - Import 6 - None are import because of matchign userid (their own) 7 - Apply patch 8 - Repeat 9 - Patrons are successfully overwritten 10 - prove -v t/db_dependent/Koha/Patrons/Import.t 11 - prove -v t/db_dependent/Koha/Patrons.t -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21465 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |nick@bywatersolutions.com |ity.org | -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21465 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|enhancement |normal -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21465 Isabel Pineda <isabel.pineda@ds.edu.sv> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |isabel.pineda@ds.edu.sv -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21465 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21465 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #79908|0 |1 is obsolete| | --- Comment #4 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 82877 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=82877&action=edit Bug 21465: Don't throw duplicate userid error if userid belongs to the matched patron To test: 1 - Export your patrons a - Create a report 'SELECT * FROM borrowers' b - Run and save the report as csv (check your delimiter) c - Delete the borrowernumebr column 2 - Use the Patron Import tool to import the csv from above 3 - Set matching to 'cardnumber' 4 - Set 'If matching record is already in the borrowers table:' to Overwrite 5 - Import 6 - None are import because of matchign userid (their own) 7 - Apply patch 8 - Repeat 9 - Patrons are successfully overwritten 10 - prove -v t/db_dependent/Koha/Patrons/Import.t 11 - prove -v t/db_dependent/Koha/Patrons.t Signed-off-by: Owen Leonard <oleonard@myacpl.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21465 --- Comment #5 from Owen Leonard <oleonard@myacpl.org> --- The tests aren't successful but as far as I can tell the errors are the same as without the patch, so not relevant. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21465 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de --- Comment #6 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Is this is a duplicate of bug 21951? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21465 Marjorie Barry-Vila <marjorie.barry-vila@collecto.ca> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |marjorie.barry-vila@collect | |o.ca -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21465 --- Comment #7 from Nick Clemens <nick@bywatersolutions.com> --- *** Bug 21951 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21465 --- Comment #8 from Nick Clemens <nick@bywatersolutions.com> --- (In reply to Katrin Fischer from comment #6)
Is this is a duplicate of bug 21951?
Other way round, only because there are tests here All tests pass for me -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21465 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org --- Comment #9 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Nick, did you investigate the new warnings your tests add? Argument "" isn't numeric in numeric eq (==) at /usr/share/perl5/DBIx/Class/Row.pm line 1018, <$handle_3a> line 2. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21465 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=21761 --- Comment #10 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Comes from eval { $patron->set(\%borrower)->store }; in import_patrons, it complains on invalid patron attribute's values (login_attempts, lost, etc.) Related to bug 21761. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21465 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- 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=21465 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #82877|0 |1 is obsolete| | --- Comment #11 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 83033 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=83033&action=edit Bug 21465: Don't throw duplicate userid error if userid belongs to the matched patron To test: 1 - Export your patrons a - Create a report 'SELECT * FROM borrowers' b - Run and save the report as csv (check your delimiter) c - Delete the borrowernumebr column 2 - Use the Patron Import tool to import the csv from above 3 - Set matching to 'cardnumber' 4 - Set 'If matching record is already in the borrowers table:' to Overwrite 5 - Import 6 - None are import because of matchign userid (their own) 7 - Apply patch 8 - Repeat 9 - Patrons are successfully overwritten 10 - prove -v t/db_dependent/Koha/Patrons/Import.t 11 - prove -v t/db_dependent/Koha/Patrons.t Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21465 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #12 from Nick Clemens <nick@bywatersolutions.com> --- Awesome work all! Pushed to master for 19.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21465 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable CC| |martin.renvoize@ptfs-europe | |.com --- Comment #13 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Pushed to 18.11.x for 18.11.01 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21465 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m --- Comment #14 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Pushed to 17.11.x for 17.11.14 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21465 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |12598 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12598 [Bug 12598] New misc/import_borrowers.pl command line tool -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21465 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|Pushed to Stable |RESOLVED --- Comment #15 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Depends on Bug 12598 not in 17.11.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21465 Jesse Maseto <jesse@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jesse@bywatersolutions.com --- Comment #16 from Jesse Maseto <jesse@bywatersolutions.com> --- This was backported to 18.05.x for 18.05.07 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21465 --- Comment #17 from Nick Clemens <nick@bywatersolutions.com> --- (In reply to Jesse Maseto from comment #16)
This was backported to 18.05.x for 18.05.07
I think it is in 18.05.08? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21465 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com --- Comment #18 from Lucas Gass <lucas@bywatersolutions.com> --- (In reply to Nick Clemens from comment #17)
(In reply to Jesse Maseto from comment #16)
This was backported to 18.05.x for 18.05.07
I think it is in 18.05.08?
Yes, 18.05.08 NOT 18.05.07 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21465 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |23734 --- Comment #19 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Jonathan Druart from comment #9)
Nick, did you investigate the new warnings your tests add?
Argument "" isn't numeric in numeric eq (==) at /usr/share/perl5/DBIx/Class/Row.pm line 1018, <$handle_3a> line 2.
(In reply to Jonathan Druart from comment #10)
Comes from eval { $patron->set(\%borrower)->store }; in import_patrons, it complains on invalid patron attribute's values (login_attempts, lost, etc.)
Related to bug 21761.
See bug 23734 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23734 [Bug 23734] Defaults set during patron imports throws warnings -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org