Skip to content

[MOSIP-45612] Load recommended centers from the configured address - #261

Closed
mohanachandran-s wants to merge 1 commit into
mosip:developfrom
mohanachandran-s:MOSIP-45612
Closed

mohanachandran-s wants to merge 1 commit into
mosip:developfrom
mohanachandran-s:MOSIP-45612

Conversation

@mohanachandran-s

@mohanachandran-s mohanachandran-s commented Oct 29, 2026 •

Copy link
Copy Markdown

Issue

MOSIP-45612: the nearest/recommended registration centre was picked from the last address field in the UI spec at the preregistration.recommended.centers.locCode hierarchy level. With more than one address (permanent and present), the result depended on field order, not on a chosen address type.

Change

  • New config preregistration.recommended.centers.locationField: the UI spec field id to use, e.g. presentZipcode for the current address.
  • CenterSelectionComponent.getRecommendedCenterLocationField() uses the configured field when it is a location field at the recommended hierarchy level.
  • Backward compatible: if the config is empty, or does not match such a field, it logs an error and uses the last matching field, as before.
  • Unit tests for the new method.

Depends on

Backend exposes the key to the UI via ui.config.params: mosip/pre-registration#1090. Deployments must also add the key to pre-registration-default.properties in mosip-config, including in ui.config.params.

Testing

  • tsc --noEmit passes for the app and spec configs.
  • Karma could not be run locally (the Angular CLI version fails to start on Node 20), so the new specs have not been executed.

🤖 Generated with Claude Code

The recommended centers were loaded from the last location field in the UI
spec at the recommended hierarchy level, so with more than one address
(permanent and present) the result depended on the order of the fields.

Add preregistration.recommended.centers.locationField to choose the UI spec
field (ex: presentZipcode) used for recommended centers. When it is not set
or is not a location field at that level, the last matching field is used,
as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Mohanachandran S <mohanachandran.s@technoforte.co.in>
@coderabbitai

coderabbitai Bot commented Oct 29, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI; Enforced overrides: Organization
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 6d9d3b7b-fb7a-43b5-be8a-541ddc1c1674
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant