Skip to content

Conversation

@tareq89
Copy link
Contributor

@tareq89 tareq89 commented Oct 6, 2025

#10582
country pr: opencrvs/opencrvs-countryconfig#1067

Screenshot 2025-10-06 at 6 15 20 PM

Description

This PR improves the certificate template selector field configuration by fixing missing logic and enhancing the user experience.

Changes

  • Fixed: defaultValue calculation now correctly respects template conditionals before selecting a default.
  • Added: A noOptionsMessage to guide users when no templates are available for an event.
  • Refactored: Certificate template filtering and default selection logic for better readability and maintainability.

Why

  • Ensures that the default certificate is only applied when its conditionals are met.
  • Provides clear feedback to users when no certificate templates are available, reducing confusion.
  • Improves code clarity and reduces duplication.

Testing

  • Verified that the default template is only preselected when its conditions are satisfied.
  • Verified that the “No template available for this event, contact Admin” message is shown when no valid templates exist.
  • Confirmed normal flows continue to work as expected.

Checklist

  • I have linked the correct Github issue under "Development"
  • I have tested the changes locally, and written appropriate tests
  • I have tested beyond the happy path (e.g. edge cases, failure paths)
  • I have updated the changelog with this change (if applicable)
  • I have updated the GitHub issue status accordingly

@github-actions
Copy link

github-actions bot commented Oct 6, 2025

Oops! Looks like you forgot to update the changelog. When updating CHANGELOG.md, please consider the following:

  • Changelog is read by country implementors who might not always be familiar with all technical details of OpenCRVS. Keep language high-level, user friendly and avoid technical references to internals.
  • Answer "What's new?", "Why was the change made?" and "Why should I care?" for each change.
  • If it's a breaking change, include a migration guide answering "What do I need to do to upgrade?".

@ocrvs-bot
Copy link
Contributor

Your environment is deployed to https://ocrvs-10582.opencrvs.dev

@tareq89 tareq89 merged commit 6e11066 into develop Oct 7, 2025
82 of 84 checks passed
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.

5 participants