[GB] IdealPostcodes: fix provider selection and address retrieval through the Postcode Service Manager framework - #11258
Draft
sergey-idealpostcodes wants to merge 1 commit into
Conversation
…n page and resolve selected addresses without the nonexistent details endpoint The provider registered its display name in Name and its key in Value, while page 9143 "Postcode Configuration Page W1" saves the selected row's Name as the service key, so every subscriber guard rejected the stored key and the selection reset to Disabled on each open. OnRetrieveAddress additionally re-fetched the picked address from /v1/<id>, a route the Ideal Postcodes API does not have, so every framework lookup failed. Accept both the token and the (now locked) display name as the service key, resolve the selected entry by re-running the search and matching Address ID (falling back to Display Text), and remove the dead GetAddressDetails / ParseAddressDetail. Adds a regression test that stores the key the way the configuration page does and asserts IsConfigured(). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
sergey-idealpostcodes
had a problem deploying
to
triage
September 9, 2026 09:36 — with
GitHub Actions
Failure
Contributor
|
Issue #11254 is not valid. Please make sure you link an issue that exists, is open and is approved. |
Author
|
@microsoft-github-policy-service agree company="Ideal Postcodes" |
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.
Fixes #11254
A BC partner integrating with IdealPostcodes as a postcode provider through the Postcode Service Manager framework reported the lookup never becoming available. Two defects:
OnDiscoverPostcodeServicesregisters the display name inNameand the key inValue, while page 9143 saves the selected row'sNameas the service key — every subscriber guard rejects the stored key,IsConfigured()stays false, and page 9143 resets the selection toDisabledon each open.OnRetrieveAddressre-fetches the picked address fromhttps://api.ideal-postcodes.co.uk/v1/<id>— a route the API does not have (we are the API vendor) — with a parser expecting fields the API never returns, so every framework lookup fails.Changes:
IPCProvider: newIsMyServiceKey()accepts both the token and the display name (label nowLocked— it acts as a key);OnRetrieveAddressre-runs the search and returns the entry matching the selectedAddress ID(fallback:Display Text), which also makes the Remove Organisation Name setting apply to the written-back address.IPCManagement: removed deadGetAddressDetails/ParseAddressDetail.TestIsConfiguredWithKeySavedByConfigurationPagestores the key exactly the way page 9143 does and assertsIsConfigured().Verified live on a BC 28.2 sandbox against the production Ideal Postcodes API (postcode SW1A 2AE), deployed as a per-tenant copy of the app.
🤖 Generated with Claude Code