Repository navigation
CN-195 Emit single-character region in CASE_UPDATE events - #38
Merged
Merged
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Merged
1 task done
🦙 MegaLinter status: ✅ SUCCESS
See detailed report in MegaLinter reports |
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The mapping preserves null and empty values while correctly separating stored and emitted region representations.
Review effort: Lite
Findings: None
What changed in this PR
Updates outbound CASE_UPDATE events to emit only the leading region character while retaining the full region code on stored cases.
Changes:
- Added leading-character mapping for outbound regions.
- Updated unit and integration tests for full stored region codes and single-character emitted values.
| File | Description |
|---|---|
CaseFieldMapper.java |
Maps outbound region values to their leading character. |
CaseServiceTest.java |
Verifies emitted and stored region values. |
NewCaseReceiverIT.java |
Tests full inbound region preservation and outbound mapping. |
InvalidAddressReceiverIT.java |
Updates shared mapper expectations. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
sumeetons
deleted the
CN-195-initial-character-region-for-case-update
branch
September 21, 2026 10:51
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.

Motivation and Context
Integrated Census services expect
CASE_UPDATEregion values to be a singlecountry character such as
E,W,N, orS. Current sample data containsmore specific region codes such as
E12000009, which the case processor waspublishing unchanged.
What has changed
Outbound CASE_UPDATE mapping
CASE_UPDATEpayloads.Automated tests
outbound mapper.
How to test?
Results: 159 tests passed with 0 failures and 1 skipped. Spotless passed.
Links
Screenshots (if appropriate):
N/A