Skip to content

Conversation

@tahmidrahman-dsi
Copy link
Contributor

Description

Clearly describe what has been changed. Include relevant context or background.
Explain how the issue was fixed (if applicable) and the root cause.

Link this pull request to the GitHub issue (and optionally name the branch ocrvs-<issue #>)

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

@tahmidrahman-dsi tahmidrahman-dsi self-assigned this Feb 5, 2026
@github-actions
Copy link

github-actions bot commented Feb 5, 2026

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?".

@tahmidrahman-dsi tahmidrahman-dsi linked an issue Feb 5, 2026 that may be closed by this pull request
5 tasks
@rikukissa rikukissa requested a review from makelicious February 6, 2026 05:48
id: 'identity.certificateId',
type: FieldType.TEXT,
parent: field('identity.http-fetch'),
parent: event.declaration('identity.http-fetch'),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not part of event declaration. It is a separate action form field.

{
type: ConditionalType.SHOW,
conditional: not(field('identity.certificateId').isFalsy())
conditional: not(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not part of event declaration. It is a separate action form field.

{
type: ConditionalType.SHOW,
conditional: field('identity.http-fetch')
conditional: event
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not part of event declaration. It is a separate action form field.

Copy link
Contributor

@makelicious makelicious left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks good.

Does it feel ergonomic? Do we anticipate that everyone just destructs the event and goes forward with

const { declaration, metadata } = event

stylistic thing, so no biggie.

I commented on few places where I noticed that the ambiguity of previous field() method went unnoticed.

I dug deeper and it seems to be more recent change, reviewed by yours truly:
#11380

I did not remember that, so that's on me. However, we are in a situation where event.declaration is used for items that are not part of event declaration.

  parent: event.declaration('identity.http-fetch'),

@naftis what was the need for this, is there a way around it, or to create a separate helper?

@rikukissa
Copy link
Member

Thanks @makelicious. I'm also thinking is there a need to distinguish between a field reference and a declaration value reference

    parent: event.declaration('tennis.style'),
    defaultValue: event.declaration('tennis.style')

would then be more a

    parent: field('tennis.style'),
    defaultValue: event.declaration('tennis.style')

reference. Or is it always just depending on context?

@naftis
Copy link
Member

naftis commented Feb 6, 2026

@makelicious The fix was to allow custom action form fields to depend on custom action form fields. So for example you can now have a custom action with a "fetch NID" -button that populates a text field.

Before the PR, the parent could only be a Declaration Field which broke interactivity in custom actions.

I did not consider new helpers etc, in my mind: field = a field in the FormFieldGenerator

@Zangetsu101
Copy link
Contributor

Zangetsu101 commented Feb 6, 2026

Let's list down the references we want to provide for configuration purposes:

  • EventIndex data (Used in EventOverview/Summary, workqueues) -- This is mostly value access
    • the declaration data
    • event metadata
  • Form data -- can be value access or reference depending on context
    • can be declaration fields
    • action fields (in action forms, declaration review)
  • Event data
    • the actions data to be used in form conditionals, certificate template filtering

Any other use cases come to mind? We probably need to maintain clear boundaries among them

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.

Allow metadata fields to be used in event summary and dateOfEvent

5 participants