Bug 6725

Summary: Make patron duplicate matching flexible
Product: Koha Reporter: Nicole C. Engard <nengard>
Component: PatronsAssignee: Jonathan Druart <jonathan.druart>
Status: CLOSED FIXED QA Contact: Bugs List <koha-bugs>
Severity: enhancement    
Priority: P5 - low CC: danielle, emma.perks, gmcharlt, jonathan.druart, kelly, lucas, marjorie.barry-vila, martin.renvoize, Niamh.WalkerHeadon
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
The new system preference 'PatronDuplicateMatchingAddFields' adds more flexibility in the de-duplication of patrons. Prior to this change only surname, firstname and dateofbirth where used. Now the list of fields is configurable.
Version(s) released in:
20.11.00
Circulation function:
Attachments: Bug 6725: Make patron duplicate matching flexible
Bug 6725: Make patron duplicate matching flexible
Bug 6725: Make patron duplicate matching flexible
Bug 6725: Make patron duplicate matching flexible
Bug 6725: (QA follow-up) Slightly rephrase PatronDuplicateMatchingAddFields

Description Nicole C. Engard 2011-08-15 18:29:06 UTC
It would be nice if the patron duplicate matching matched on more fields than just the first/last name combo.  If a patron comes in and uses a nickname the second time around you find them - so maybe options to match on phone or email or birthdate - it would probably have to be a system preference where you choose what is used to find the match.
Comment 1 Emma Perks 2017-08-07 11:31:31 UTC
Valid - needed
Comment 2 Katrin Fischer 2019-05-04 11:40:46 UTC
Still valid.
Comment 3 Kelly McElligott 2019-10-22 14:42:18 UTC
Yes this would be super helpful!  I would agree .
Comment 4 Danielle Elder 2019-10-22 15:01:54 UTC
CLI options would be nice too. ;)
Comment 5 Jonathan Druart 2020-08-05 10:26:06 UTC
Created attachment 107824 [details] [review]
Bug 6725: Make patron duplicate matching flexible

This patch adds a new system preference PatronDuplicateMatchingAddFields
to list the patron's attributes to use for deduplication.
The default value is surname, firstname and dateofbirth to keep existing
behaviour.

Test plan:
0. Apply the patch and execute the update DB entry
1. Create a new patron with surname, firstname
2. Create another patron with the same surname, firstname values
=> Confirm you get the duplicate warning
3. Modify the syspref to edit the list of attributes used to dedup
4. Repeat 1 and 2 with different values and confirm that you get the
behaviours you expect

Note: This is only impacting the add patron form from the UI, not the
import patrons tool.
Comment 6 Martin Renvoize (ashimema) 2020-08-05 16:27:23 UTC
Created attachment 107846 [details] [review]
Bug 6725: Make patron duplicate matching flexible

This patch adds a new system preference PatronDuplicateMatchingAddFields
to list the patron's attributes to use for deduplication.
The default value is surname, firstname and dateofbirth to keep existing
behaviour.

Test plan:
0. Apply the patch and execute the update DB entry
1. Create a new patron with surname, firstname
2. Create another patron with the same surname, firstname values
=> Confirm you get the duplicate warning
3. Modify the syspref to edit the list of attributes used to dedup
4. Repeat 1 and 2 with different values and confirm that you get the
behaviours you expect

Note: This is only impacting the add patron form from the UI, not the
import patrons tool.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 7 Martin Renvoize (ashimema) 2020-08-05 16:28:02 UTC
A nice enhancement that works well.. the code is clear and makes sense and we're passing the qa scripts.. 

Signing off.
Comment 8 ByWater Sandboxes 2020-08-05 19:29:18 UTC
Created attachment 107859 [details] [review]
Bug 6725: Make patron duplicate matching flexible

This patch adds a new system preference PatronDuplicateMatchingAddFields
to list the patron's attributes to use for deduplication.
The default value is surname, firstname and dateofbirth to keep existing
behaviour.

Test plan:
0. Apply the patch and execute the update DB entry
1. Create a new patron with surname, firstname
2. Create another patron with the same surname, firstname values
=> Confirm you get the duplicate warning
3. Modify the syspref to edit the list of attributes used to dedup
4. Repeat 1 and 2 with different values and confirm that you get the
behaviours you expect

Note: This is only impacting the add patron form from the UI, not the
import patrons tool.

Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com>
Comment 9 Katrin Fischer 2020-08-15 11:24:16 UTC
Created attachment 108320 [details] [review]
Bug 6725: Make patron duplicate matching flexible

This patch adds a new system preference PatronDuplicateMatchingAddFields
to list the patron's attributes to use for deduplication.
The default value is surname, firstname and dateofbirth to keep existing
behaviour.

Test plan:
0. Apply the patch and execute the update DB entry
1. Create a new patron with surname, firstname
2. Create another patron with the same surname, firstname values
=> Confirm you get the duplicate warning
3. Modify the syspref to edit the list of attributes used to dedup
4. Repeat 1 and 2 with different values and confirm that you get the
behaviours you expect

Note: This is only impacting the add patron form from the UI, not the
import patrons tool.

Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 10 Katrin Fischer 2020-08-15 11:24:20 UTC
Created attachment 108321 [details] [review]
Bug 6725: (QA follow-up) Slightly rephrase PatronDuplicateMatchingAddFields

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 11 Jonathan Druart 2020-08-18 15:45:52 UTC
Pushed to master for 20.11, thanks to everybody involved!
Comment 12 Lucas Gass (lukeg) 2020-09-04 15:36:46 UTC
enhancement will not be backported to 20.05.x