[Bug 43069] New: Empty PatronDuplicateMatchingAddFields considers every new patron as duplicate
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43069 Bug ID: 43069 Summary: Empty PatronDuplicateMatchingAddFields considers every new patron as duplicate Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Patrons Assignee: koha-bugs@lists.koha-community.org Reporter: pedro.amorim@openfifth.co.uk QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle@bywatersolutions.com Target Milestone: --- -- 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=43069 Pedro Amorim (ammopt) <pedro.amorim@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |chris.rowlands6@nhs.net, | |pedro.amorim@openfifth.co.u | |k -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43069 Pedro Amorim (ammopt) <pedro.amorim@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |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=43069 --- Comment #1 from Pedro Amorim (ammopt) <pedro.amorim@openfifth.co.uk> --- Created attachment 201911 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=201911&action=edit Bug 43069: Don't match every patron when no duplicate-match fields apply check_for_existing_matches() called Koha::Patrons->search(undef) when PatronDuplicateMatchingAddFields left no usable field to match on, which matches every patron instead of none. -- 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=43069 --- Comment #2 from Pedro Amorim (ammopt) <pedro.amorim@openfifth.co.uk> --- Created attachment 201912 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=201912&action=edit Bug 43069: Add tests 1) Set system preference 'PatronDuplicateMatchingAddFields' to empty (no fields ticked) 2) Go to <staff_url>/cgi-bin/koha/members/memberentry.pl?op=add and fill in the mandatory fields for a brand new patron (one that definitely doesn't exist yet) 3) Click 'Save' 4) Notice you get the 'Duplicate patron record?' dialog, even though no patron like this exists 5) Apply the patch. Restart plack 6) Repeat steps 2-3 with another new patron 7) Confirm the patron is created fine this time, no false duplicate error 8) Also try setting 'PatronDuplicateMatchingAddFields' to a field (e.g. 'city') and submit a new patron with that field left blank - confirm no false duplicate there either 9) Run: prove 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=43069 Pedro Amorim (ammopt) <pedro.amorim@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |pedro.amorim@openfifth.co.u |ity.org |k -- 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=43069 David Nind <david@davidnind.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=43069 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #201911|0 |1 is obsolete| | Attachment #201912|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43069 --- Comment #3 from David Nind <david@davidnind.com> --- Created attachment 201973 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=201973&action=edit Bug 43069: Don't match every patron when no duplicate-match fields apply check_for_existing_matches() called Koha::Patrons->search(undef) when PatronDuplicateMatchingAddFields left no usable field to match on, which matches every patron instead of none. Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43069 --- Comment #4 from David Nind <david@davidnind.com> --- Created attachment 201974 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=201974&action=edit Bug 43069: Add tests 1) Set system preference 'PatronDuplicateMatchingAddFields' to empty (no fields ticked) 2) Go to <staff_url>/cgi-bin/koha/members/memberentry.pl?op=add and fill in the mandatory fields for a brand new patron (one that definitely doesn't exist yet) 3) Click 'Save' 4) Notice you get the 'Duplicate patron record?' dialog, even though no patron like this exists 5) Apply the patch. Restart plack 6) Repeat steps 2-3 with another new patron 7) Confirm the patron is created fine this time, no false duplicate error 8) Also try setting 'PatronDuplicateMatchingAddFields' to a field (e.g. 'city') and submit a new patron with that field left blank - confirm no false duplicate there either 9) Run: prove t/db_dependent/Koha/Patrons.t Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43069 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com --- Comment #5 from David Nind <david@davidnind.com> --- Testing notes (using KTD): 1. If I follow the test plan, for steps 2-4 (using /cgi-bin/koha/members/memberentry.pl?op=add), I get a different message after clicking 'Save': - End up at /cgi-bin/koha/members/memberentry.pl - with: Patrons > Modify patron Patron not found. Return to search 2. If I go to Patrons > New patron > Patron (/cgi-bin/koha/members/memberentry.pl?op=add_form&categorycode=PT) and click 'Save' I get the message as noted in the test plan: Duplicate patron record? Koha Admin (1) View existing record It is a duplicate. Edit existing record | Not a duplicate. Save as new record 3. After the patches, I can create patron record using step 2 above. With step 1 above I get the same result as before the patch. So maybe the URL in step 2 of the test plan is not correct? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43069 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Sponsorship status|--- |Unsponsored Patch complexity|--- |Trivial patch QA Contact|testopia@bugs.koha-communit |martin.renvoize@openfifth.c |y.org |o.uk 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=43069 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #201973|0 |1 is obsolete| | Attachment #201974|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43069 --- Comment #6 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 201991 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=201991&action=edit Bug 43069: Don't match every patron when no duplicate-match fields apply check_for_existing_matches() called Koha::Patrons->search(undef) when PatronDuplicateMatchingAddFields left no usable field to match on, which matches every patron instead of none. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43069 --- Comment #7 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 201992 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=201992&action=edit Bug 43069: Add tests 1) Set system preference 'PatronDuplicateMatchingAddFields' to empty (no fields ticked) 2) Go to <staff_url>/cgi-bin/koha/members/memberentry.pl?op=add and fill in the mandatory fields for a brand new patron (one that definitely doesn't exist yet) 3) Click 'Save' 4) Notice you get the 'Duplicate patron record?' dialog, even though no patron like this exists 5) Apply the patch. Restart plack 6) Repeat steps 2-3 with another new patron 7) Confirm the patron is created fine this time, no false duplicate error 8) Also try setting 'PatronDuplicateMatchingAddFields' to a field (e.g. 'city') and submit a new patron with that field left blank - confirm no false duplicate there either 9) Run: prove t/db_dependent/Koha/Patrons.t Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43069 --- Comment #8 from Pedro Amorim (ammopt) <pedro.amorim@openfifth.co.uk> --- (In reply to David Nind from comment #5)
So maybe the URL in step 2 of the test plan is not correct?
Yep, the URL is wrong on the test plan. It should be: <staff_url>/cgi-bin/koha/members/memberentry.pl?op=add_form&categorycode=S Matching the URL produced when clicking "New patron" -> Picking a category on the UI. Thanks for pointing it out David. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43069 Pedro Amorim (ammopt) <pedro.amorim@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |26.11.00 released in| | Status|Passed QA |Pushed to main -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43069 --- Comment #9 from Pedro Amorim (ammopt) <pedro.amorim@openfifth.co.uk> --- Thanks everyone! Pushed to main for 26.11! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43069 Pedro Amorim (ammopt) <pedro.amorim@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |rel_25_11_candidate, | |rel_26_05_candidate -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org