Skip to content

[GB] IdealPostcodes: fix provider selection and address retrieval through the Postcode Service Manager framework - #11258

Draft
sergey-idealpostcodes wants to merge 1 commit into
microsoft:mainfrom
sergey-idealpostcodes:fix/gb-idealpostcodes-service-key-and-retrieve-address
Draft

[GB] IdealPostcodes: fix provider selection and address retrieval through the Postcode Service Manager framework#11258
sergey-idealpostcodes wants to merge 1 commit into
microsoft:mainfrom
sergey-idealpostcodes:fix/gb-idealpostcodes-service-key-and-retrieve-address

Conversation

@sergey-idealpostcodes

Copy link
Copy Markdown

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:

  1. OnDiscoverPostcodeServices registers the display name in Name and the key in Value, while page 9143 saves the selected row's Name as the service key — every subscriber guard rejects the stored key, IsConfigured() stays false, and page 9143 resets the selection to Disabled on each open.
  2. OnRetrieveAddress re-fetches the picked address from https://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: new IsMyServiceKey() accepts both the token and the display name (label now Locked — it acts as a key); OnRetrieveAddress re-runs the search and returns the entry matching the selected Address ID (fallback: Display Text), which also makes the Remove Organisation Name setting apply to the written-back address.
  • IPCManagement: removed dead GetAddressDetails/ParseAddressDetail.
  • Tests: TestIsConfiguredWithKeySavedByConfigurationPage stores the key exactly the way page 9143 does and asserts IsConfigured().

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

…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>
@github-actions github-actions Bot added the From Fork Pull request is coming from a fork label Sep 9, 2026
@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Issue #11254 is not valid. Please make sure you link an issue that exists, is open and is approved.

@github-actions github-actions Bot added needs-approval Workflow runs require maintainer approval to start and removed needs-approval Workflow runs require maintainer approval to start labels Sep 9, 2026
@sergey-idealpostcodes

Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree company="Ideal Postcodes"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

From Fork Pull request is coming from a fork needs-approval Workflow runs require maintainer approval to start

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[GB] IdealPostcodes provider is unusable through the Postcode Service Manager framework

1 participant