Bug 40082 - PatronDuplicateMatchingAddFields isn't respected in the OPAC or the API
Summary: PatronDuplicateMatchingAddFields isn't respected in the OPAC or the API
Status: Passed QA
Alias: None
Product: Koha
Classification: Unclassified
Component: Patrons (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Matt Blenkinsop
QA Contact: Andrew Fuerste-Henry
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-06-05 12:37 UTC by Matt Blenkinsop
Modified: 2025-11-10 15:18 UTC (History)
5 users (show)

See Also:
GIT URL:
Initiative type: ---
Sponsorship status: ---
Comma delimited list of Sponsors:
Crowdfunding goal: 0
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 40082: Move the duplicate matching logic to the Koha::Patrons class (2.34 KB, patch)
2025-06-05 12:49 UTC, Matt Blenkinsop
Details | Diff | Splinter Review
Bug 40082: Use the new duplicate checking method in the API (1.87 KB, patch)
2025-06-05 12:49 UTC, Matt Blenkinsop
Details | Diff | Splinter Review
Bug 40082: Use the new duplicate checking method in the OPAC (2.87 KB, patch)
2025-06-05 12:49 UTC, Matt Blenkinsop
Details | Diff | Splinter Review
Bug 40082: Add unit tests (6.97 KB, patch)
2025-06-05 12:49 UTC, Matt Blenkinsop
Details | Diff | Splinter Review
Bug 40082: Move the duplicate matching logic to the Koha::Patrons class (2.53 KB, patch)
2025-06-05 12:52 UTC, Matt Blenkinsop
Details | Diff | Splinter Review
Bug 40082: Use the new duplicate checking method in the API (1.87 KB, patch)
2025-06-05 12:52 UTC, Matt Blenkinsop
Details | Diff | Splinter Review
Bug 40082: Use the new duplicate checking method in the OPAC (2.87 KB, patch)
2025-06-05 12:52 UTC, Matt Blenkinsop
Details | Diff | Splinter Review
Bug 40082: Add unit tests (6.97 KB, patch)
2025-06-05 12:52 UTC, Matt Blenkinsop
Details | Diff | Splinter Review
Bug 40082: Move the duplicate matching logic to the Koha::Patrons class (2.53 KB, patch)
2025-10-13 14:20 UTC, Matt Blenkinsop
Details | Diff | Splinter Review
Bug 40082: Use the new duplicate checking method in the API (1.87 KB, patch)
2025-10-13 14:20 UTC, Matt Blenkinsop
Details | Diff | Splinter Review
Bug 40082: Use the new duplicate checking method in the OPAC (2.87 KB, patch)
2025-10-13 14:20 UTC, Matt Blenkinsop
Details | Diff | Splinter Review
Bug 40082: Add unit tests (6.96 KB, patch)
2025-10-13 14:20 UTC, Matt Blenkinsop
Details | Diff | Splinter Review
Bug 40082: Add unit tests (9.51 KB, patch)
2025-11-10 12:55 UTC, Matt Blenkinsop
Details | Diff | Splinter Review
Bug 40082: Move the duplicate matching logic to the Koha::Patrons class (2.59 KB, patch)
2025-11-10 13:20 UTC, Andrew Fuerste-Henry
Details | Diff | Splinter Review
Bug 40082: Use the new duplicate checking method in the API (1.93 KB, patch)
2025-11-10 13:20 UTC, Andrew Fuerste-Henry
Details | Diff | Splinter Review
Bug 40082: Use the new duplicate checking method in the OPAC (2.94 KB, patch)
2025-11-10 13:20 UTC, Andrew Fuerste-Henry
Details | Diff | Splinter Review
Bug 40082: Add unit tests (9.57 KB, patch)
2025-11-10 13:20 UTC, Andrew Fuerste-Henry
Details | Diff | Splinter Review
Bug 40082: Move the duplicate matching logic to the Koha::Patrons class (2.65 KB, patch)
2025-11-10 15:16 UTC, Andrew Fuerste-Henry
Details | Diff | Splinter Review
Bug 40082: Use the new duplicate checking method in the API (1.99 KB, patch)
2025-11-10 15:16 UTC, Andrew Fuerste-Henry
Details | Diff | Splinter Review
Bug 40082: Use the new duplicate checking method in the OPAC (2.99 KB, patch)
2025-11-10 15:17 UTC, Andrew Fuerste-Henry
Details | Diff | Splinter Review
Bug 40082: Add unit tests (9.63 KB, patch)
2025-11-10 15:17 UTC, Andrew Fuerste-Henry
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Matt Blenkinsop 2025-06-05 12:37:19 UTC
There is a syspref for checking new patrons for duplicates that is only implemented in the staff interface - it should also be respected when adding a patron via the API or the OPAC
Comment 1 Matt Blenkinsop 2025-06-05 12:49:46 UTC
Created attachment 182990 [details] [review]
Bug 40082: Move the duplicate matching logic to the Koha::Patrons class
Comment 2 Matt Blenkinsop 2025-06-05 12:49:49 UTC
Created attachment 182991 [details] [review]
Bug 40082: Use the new duplicate checking method in the API
Comment 3 Matt Blenkinsop 2025-06-05 12:49:52 UTC
Created attachment 182992 [details] [review]
Bug 40082: Use the new duplicate checking method in the OPAC
Comment 4 Matt Blenkinsop 2025-06-05 12:49:55 UTC
Created attachment 182993 [details] [review]
Bug 40082: Add unit tests

Test plan:
1) Choose an existing patron and note their first and second names as well as their date of birth
2) In the interface, create a new patron and enter all of those details to be the same as your patron from step 1
3) Submit the form, you will get a warning saying that there is a duplicate
4) In the OPAC, self register a new patron using the same details again
5) The form should submit with no error or warning
6) Apply patch, yarn api:bundle and restart_all
7) Repeat steps 2 - 5
8) Step 3 should still have the same behaviour
9) Step 5 should now show a warning at the top to say that there is a duplicate, please contact a member of staff
10) Find the 'PatronDuplicateMatchingAddFields' syspref and select an extra field there, ensuring that your patron from step 1 has data for that field
11) In either the interface or the OPAC, register a new patron but this time change the data of the new field you added in step 10
12) No warning should show for a duplicate patron
13) prove t/db_dependent/api/v1/patrons.t
14) prove t/db_dependent/Koha/Patrons.t
Comment 5 Matt Blenkinsop 2025-06-05 12:52:35 UTC
Created attachment 182994 [details] [review]
Bug 40082: Move the duplicate matching logic to the Koha::Patrons class
Comment 6 Matt Blenkinsop 2025-06-05 12:52:37 UTC
Created attachment 182995 [details] [review]
Bug 40082: Use the new duplicate checking method in the API
Comment 7 Matt Blenkinsop 2025-06-05 12:52:40 UTC
Created attachment 182996 [details] [review]
Bug 40082: Use the new duplicate checking method in the OPAC
Comment 8 Matt Blenkinsop 2025-06-05 12:52:47 UTC
Created attachment 182997 [details] [review]
Bug 40082: Add unit tests

Test plan:
1) Choose an existing patron and note their first and second names as well as their date of birth
2) In the interface, create a new patron and enter all of those details to be the same as your patron from step 1
3) Submit the form, you will get a warning saying that there is a duplicate
4) In the OPAC, self register a new patron using the same details again
5) The form should submit with no error or warning
6) Apply patch, yarn api:bundle and restart_all
7) Repeat steps 2 - 5
8) Step 3 should still have the same behaviour
9) Step 5 should now show a warning at the top to say that there is a duplicate, please contact a member of staff
10) Find the 'PatronDuplicateMatchingAddFields' syspref and select an extra field there, ensuring that your patron from step 1 has data for that field
11) In either the interface or the OPAC, register a new patron but this time change the data of the new field you added in step 10
12) No warning should show for a duplicate patron
13) prove t/db_dependent/api/v1/patrons.t
14) prove t/db_dependent/Koha/Patrons.t
Comment 9 Andrew Fuerste-Henry 2025-10-10 16:58:03 UTC
Matt, can you please rebase? I seem to be doing something wrong in clearing merge errors in t/db_dependent/Koha/Patrons.t, causing it to fail.
Comment 10 Matt Blenkinsop 2025-10-13 14:20:32 UTC
Created attachment 187844 [details] [review]
Bug 40082: Move the duplicate matching logic to the Koha::Patrons class
Comment 11 Matt Blenkinsop 2025-10-13 14:20:34 UTC
Created attachment 187845 [details] [review]
Bug 40082: Use the new duplicate checking method in the API
Comment 12 Matt Blenkinsop 2025-10-13 14:20:37 UTC
Created attachment 187846 [details] [review]
Bug 40082: Use the new duplicate checking method in the OPAC
Comment 13 Matt Blenkinsop 2025-10-13 14:20:39 UTC
Created attachment 187847 [details] [review]
Bug 40082: Add unit tests

Test plan:
1) Choose an existing patron and note their first and second names as well as their date of birth
2) In the interface, create a new patron and enter all of those details to be the same as your patron from step 1
3) Submit the form, you will get a warning saying that there is a duplicate
4) In the OPAC, self register a new patron using the same details again
5) The form should submit with no error or warning
6) Apply patch, yarn api:bundle and restart_all
7) Repeat steps 2 - 5
8) Step 3 should still have the same behaviour
9) Step 5 should now show a warning at the top to say that there is a duplicate, please contact a member of staff
10) Find the 'PatronDuplicateMatchingAddFields' syspref and select an extra field there, ensuring that your patron from step 1 has data for that field
11) In either the interface or the OPAC, register a new patron but this time change the data of the new field you added in step 10
12) No warning should show for a duplicate patron
13) prove t/db_dependent/api/v1/patrons.t
14) prove t/db_dependent/Koha/Patrons.t
Comment 14 Matt Blenkinsop 2025-11-10 12:55:07 UTC
Created attachment 189386 [details] [review]
Bug 40082: Add unit tests

Test plan:
1) Choose an existing patron and note their first and second names as well as their date of birth
2) In the interface, create a new patron and enter all of those details to be the same as your patron from step 1
3) Submit the form, you will get a warning saying that there is a duplicate
4) In the OPAC, self register a new patron using the same details again
5) The form should submit with no error or warning
6) Apply patch, yarn api:bundle and restart_all
7) Repeat steps 2 - 5
8) Step 3 should still have the same behaviour
9) Step 5 should now show a warning at the top to say that there is a duplicate, please contact a member of staff
10) Find the 'PatronDuplicateMatchingAddFields' syspref and select an extra field there, ensuring that your patron from step 1 has data for that field
11) In either the interface or the OPAC, register a new patron but this time change the data of the new field you added in step 10
12) No warning should show for a duplicate patron
13) prove t/db_dependent/api/v1/patrons.t
14) prove t/db_dependent/Koha/Patrons.t
Comment 15 Andrew Fuerste-Henry 2025-11-10 13:20:40 UTC
Created attachment 189389 [details] [review]
Bug 40082: Move the duplicate matching logic to the Koha::Patrons class

Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Comment 16 Andrew Fuerste-Henry 2025-11-10 13:20:43 UTC
Created attachment 189390 [details] [review]
Bug 40082: Use the new duplicate checking method in the API

Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Comment 17 Andrew Fuerste-Henry 2025-11-10 13:20:46 UTC
Created attachment 189391 [details] [review]
Bug 40082: Use the new duplicate checking method in the OPAC

Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Comment 18 Andrew Fuerste-Henry 2025-11-10 13:20:49 UTC
Created attachment 189392 [details] [review]
Bug 40082: Add unit tests

Test plan:
1) Choose an existing patron and note their first and second names as well as their date of birth
2) In the interface, create a new patron and enter all of those details to be the same as your patron from step 1
3) Submit the form, you will get a warning saying that there is a duplicate
4) In the OPAC, self register a new patron using the same details again
5) The form should submit with no error or warning
6) Apply patch, yarn api:bundle and restart_all
7) Repeat steps 2 - 5
8) Step 3 should still have the same behaviour
9) Step 5 should now show a warning at the top to say that there is a duplicate, please contact a member of staff
10) Find the 'PatronDuplicateMatchingAddFields' syspref and select an extra field there, ensuring that your patron from step 1 has data for that field
11) In either the interface or the OPAC, register a new patron but this time change the data of the new field you added in step 10
12) No warning should show for a duplicate patron
13) prove t/db_dependent/api/v1/patrons.t
14) prove t/db_dependent/Koha/Patrons.t

Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Comment 19 Andrew Fuerste-Henry 2025-11-10 15:16:56 UTC
Created attachment 189416 [details] [review]
Bug 40082: Move the duplicate matching logic to the Koha::Patrons class

Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>

Signed-off-by: Pamela Bird <pbird@cityofchesapeake.net>
Comment 20 Andrew Fuerste-Henry 2025-11-10 15:16:59 UTC
Created attachment 189417 [details] [review]
Bug 40082: Use the new duplicate checking method in the API

Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>

Signed-off-by: Pamela Bird <pbird@cityofchesapeake.net>
Comment 21 Andrew Fuerste-Henry 2025-11-10 15:17:02 UTC
Created attachment 189418 [details] [review]
Bug 40082: Use the new duplicate checking method in the OPAC

Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>

Signed-off-by: Pamela Bird <pbird@cityofchesapeake.net>
Comment 22 Andrew Fuerste-Henry 2025-11-10 15:17:05 UTC
Created attachment 189419 [details] [review]
Bug 40082: Add unit tests

Test plan:
1) Choose an existing patron and note their first and second names as well as their date of birth
2) In the interface, create a new patron and enter all of those details to be the same as your patron from step 1
3) Submit the form, you will get a warning saying that there is a duplicate
4) In the OPAC, self register a new patron using the same details again
5) The form should submit with no error or warning
6) Apply patch, yarn api:bundle and restart_all
7) Repeat steps 2 - 5
8) Step 3 should still have the same behaviour
9) Step 5 should now show a warning at the top to say that there is a duplicate, please contact a member of staff
10) Find the 'PatronDuplicateMatchingAddFields' syspref and select an extra field there, ensuring that your patron from step 1 has data for that field
11) In either the interface or the OPAC, register a new patron but this time change the data of the new field you added in step 10
12) No warning should show for a duplicate patron
13) prove t/db_dependent/api/v1/patrons.t
14) prove t/db_dependent/Koha/Patrons.t

Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>

Signed-off-by: Pamela Bird <pbird@cityofchesapeake.net>
Comment 23 Andrew Fuerste-Henry 2025-11-10 15:18:57 UTC
Adding a user sign-off and bumping my own SO up to QA.