Prevent PatronRegistrationCreate from Reusing a Postal Code Record with the Wrong County
When PatronRegistrationCreate is configured to allow creation of new postal code entries, the API should consider an explicitly supplied COUNTY when determining whether an existing postal code record is an appropriate match.
Currently, if a ZIP code, city, and state already exist in the PostalCodes table, the API will reuse that record even when the COUNTY supplied in the registration request is different.
If a county is explicitly supplied, the matching process should require the county to match in addition to ZIP code, city, and state. If no EXACT combination exists, the system should create a new postal code record using the supplied values rather than silently associating the patron with a different county.
This would make the behavior more consistent with other PatronRegistrationCreate scenarios, including cases where no record exists for the ZIP code and the API successfully creates a new postal code entry.
Correct county information is important for patron data quality, reporting, geographic analysis, and integrations that rely on the county value supplied during registration.
Reference ticket #10781432
-
Wes Osborn
commented
Not being able to accurately rely on selecting the proper postal code when it has been supplied with this information is troublesome.