AB#32455 update intake applicant electoral district handling and add corrective scripts#2220
Merged
Merged
Conversation
…corrective scripts
Contributor
There was a problem hiding this comment.
Pull request overview
Updates how the intake pipeline derives an applicant’s electoral district by refining the geocoding search address, adding more diagnostic logging and confidence handling, and introducing PowerShell utilities to validate and generate corrective SQL scripts for existing data.
Changes:
- Replaced full formatted address usage with a geocoding-focused search address (Street, Street2, City).
- Enhanced electoral district determination logging and added a low geocoder-score cutoff path.
- Added scripts to (1) validate electoral districts via BC Geocoder + WFS and (2) generate PostgreSQL UPDATE statements for mismatches.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 8 comments.
| File | Description |
|---|---|
| applications/Unity.GrantManager/src/Unity.GrantManager.Domain/Applications/ApplicantAddress.cs | Renames/changes address composition to a geocoding “search address” (Street, Street2, City). |
| applications/Unity.GrantManager/src/Unity.GrantManager.Application/Intakes/Handlers/DetermineElectoralDistrictHandler.cs | Uses the search address for geocoding; adds score-based handling and expanded logs. |
| applications/Unity.GrantManager/scripts/Validate-ElectoralDistricts.ps1 | New script to audit electoral districts by geocoding unique addresses and querying WFS. |
| applications/Unity.GrantManager/scripts/Generate-ElectoralDistrictFixes.ps1 | New script to generate SQL updates/nullifications based on validated CSV results and score threshold. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
update intake applicant electoral district handling and add corrective scripts