Releases: opencrvs/opencrvs-core
OpenCRVS - v1.9.6
Introduction
OpenCRVS v1.9.6 is a hotfix release which includes bug fixes, improvements and new functionality.
It is to be used in conjunction with a forked country configuration release v1.9.6
New features
- NUMBER_WITH_UNIT Input, which is a number input with a configurable selectable unit of measurement.
now()magic function, which can be used as a dynamicdefaultValuefor DATE and TIME inputs and resolves to the current date/time at runtime.- The document upload and preview feature now supports PDF files in addition to image formats (JPEG, PNG, JPG), allowing PDFs to be viewed alongside existing DECLARED and REGISTERED documents.
OpenCRVS - v1.8.3
Introduction
OpenCRVS v1.8.3 is a hotfix release that includes fixes based on the identified needs of countries using OpenCRVS. It is to be used in conjunction with a forked country configuration release v1.8.3
Bug fixes
- Adjust content security policy, so that library used for image compression works as expected #11627
OpenCRVS - v1.9.5
Introduction
OpenCRVS v1.9.5 is a hotfix release which includes bug fixes, improvements and new functionality.
It is to be used in conjunction with a forked country configuration release v1.9.5
New features
- Introduced new configuration option
maxImageSizeforFILEandFILE_WITH_OPTIONStype of form fields to limit the maximum size of uploaded images. If the uploaded image exceeds provide size in pixels, a crop and resize tool will be shown to the user to adjust the image before uploading. #10324
Usage example:
A file field that allows uploading an image with maximum size of 600x600 pixels:
{
id: 'applicant.image',
type: 'FILE', // or 'FILE_WITH_OPTIONS'
...
configuration: {
maxImageSize: { targetSize: { height: 600, width: 600 } }
}
}Uploaded image files can now be rendered in certificate svg templates using the $lookup Handlebars helper. Below is an example of rendering the uploaded applicant image added in declaration form through a FILE field in a certificate template:
Also for FILE_WITH_OPTIONS fields, the selected option can be accessed using the following syntax, you just need to provide the option value as the last part of the path:
Annotation data from actions can also be accessed in a similar way using the $action or $actions helpers. For example, to access an uploaded image in the PRINT_CERTIFICATE action annotation data:
- Add registration number field to advanced search configuration so that documents can be searched by their
Registration Number. #10760
Bug fixes
-
Fix quick search failing when configured with a large number of events and many searchable fields #11397
-
In quick search, when searching with a valid email address, the search is performed only against email fields [#11199]
Improvements
User default values in form fields
Form fields now support typed user(...) references as default values, replacing legacy string-based $user.* template variables.
TEXT fields can use the following user references as default values:
- user('name')
- user('fullHonorificName')
- user('device')
- user('firstname')
- user('middlename')
- user('surname')
- user('role')
NAME fields now support user-based default values by assigning user references per name part. The recommended approach is:
defaultValue: {
firstname: user('firstname'),
middlename: user('middlename'), // optional
surname: user('surname')
}Using user('name') as a default value is only supported for FieldType.TEXT.
It represents the user’s full name and should not be used with FieldType.NAME, since full names may contain multiple words and cannot be reliably split into individual name parts.
Legacy string-based user template variables (e.g. $user.name) are now deprecated in favour of user(...) references.
OpenCRVS - v1.9.4
OpenCRVS - v1.9.3
Introduction
OpenCRVS v1.9.3 is a hotfix release which includes bug fixes, improvements and new functionality.
It is to be used in conjunction with a forked country configuration release v1.9.3
New features
- Introduced form page level config -
requireCompletionToContinueto enforce full completion of the form page before moving to the next page.
Improvements
- Add support for validating dates before/after another date field using
isBeforeandisAftervalidators. #11194
Usage example:
// 6570 days before another field
field('mother.dob').isBefore().days(6570).fromDate(field('child.dob'))
// 6570 days after another field
field('mother.dateOfMarriage')
.isAfter()
.days(6570)
.fromDate(field('mother.dob'))
// 45 days before now
field('child.dob').isBefore().days(45).fromNow()Bug fixes
- Fixes an issue where
event.hasActionwas not working in form configurations #11074
OpenCRVS - v1.9.2
Introduction
OpenCRVS v1.9.2 is a hotfix release which includes bug fixes, improvements and new functionality.
It is to be used in conjunction with a forked country configuration release v1.9.2
New features
- Toolkit now exports
window().location.getto country config that can be used as a template variable e.g. in HttpField request body.
OpenCRVS - v1.9.1
Introduction
OpenCRVS v1.9.1 is a hotfix release which includes bug fixes, improvements and new functionality.
It is to be used in conjunction with a forked country configuration release v1.9.1
Breaking changes
-
QUERY_PARAM_READERnow returns picked params under adataobject.
For example,codeandstateare now accessed viadata.codeanddata.state.Previously:
field(.query-params).get('code')
Now:
field(.query-params).get('data.code') -
Removed support for following scopes
NATLSYSADMINDECLAREVALIDATECERTIFYPERFORMANCESYSADMINTEAMSCONFIGRECORD_EXPORT_RECORDSRECORD_DECLARATION_PRINTRECORD_PRINT_RECORDS_SUPPORTING_DOCUMENTSRECORD_REGISTRATION_PRINTRECORD_PRINT_CERTIFIED_COPIESRECORD_REGISTRATION_VERIFY_CERTIFIED_COPIESPROFILE_UPDATE
New features
- Add multi-field search with a single component #10617
- Search Field: A new form field that allows searching previous records and using the data to pre-fill the current form. #10131
- HTTP input now accepts
field('..')references in the HTTP body definition. - Searchable Select: A new select component that allows searching through options. Useful for selects with a large number of options. Currently being used in address fields. #10749
Bug fixes
- During user password reset, email address lookup is now case insensitive #9869
- Users cannot activate or reactivate users with roles not specified in the
user.editscope #9933 - Login page no longer show "Farajaland CRVS" before showing the correct title #10958
ALPHA_PRINT_BUTTONdoes not get disabled after first print #10953
OpenCRVS - v1.9.0
Introduction
OpenCRVS v1.9.0 is a minor release which includes bug fixes, improvements and new functionality.
It is to be used in conjunction with a forked country configuration release v1.9.0
Breaking changes
- Dashboard configuration through Metabase has been fully migrated to countryconfig, and the standalone dashboard package has been removed.
For details on configuring dashboards and information about the latest updates, refer to the ANALYTICS.md documentation.
New features
Events V2
We are excited to announce a major overhaul of our events system: Events V2.
This is a complete rewrite that introduces a new level of flexibility and configurability to how life events are defined and managed across the system.
The new Events V2 architecture is built around a set of core concepts designed to make event management more powerful and customizable.
Events
An Event represents a life event (or any kind of event), such as a birth or a marriage.
Each event is defined by a configuration that specifies the sequence of Actions required to register it.
Actions
Declaration Actions
Declaration actions are used to modify an event’s declaration.
These actions must be executed in a defined order and cannot be skipped.
- DECLARE
- VALIDATE
- REGISTER
Each action must be accepted by countryconfig before the next one can be performed.
Rejecting and Archiving
After declaration, instead of proceeding with registration, an event may be either rejected or archived.
If deduplication is enabled for an action, performing that action may trigger a DUPLICATE_DETECTED action if duplicates are found.
When this occurs, two additional actions become available:
- MARK_AS_DUPLICATE – archives the event.
- MARK_AS_NOT_DUPLICATE – resumes the normal action flow.
If an event is rejected by a user, the preceding action must be repeated before continuing.
Actions Before Declaration
- NOTIFY – a partial version of the
DECLAREaction. - DELETE – an event can be deleted only if no declaration action has yet been performed.
Actions After Registration
Once an event has been registered, a certificate may be printed.
If a correction is required due to an error in the registered declaration, a correction workflow must be initiated.
- PRINT_CERTIFICATE
- REQUEST_CORRECTION
- REJECT_CORRECTION
- APPROVE_CORRECTION
General / Meta Actions
- READ – appended to the action trail whenever a complete event record is retrieved.
- ASSIGN – required before any action can be performed. By default, the user is automatically unassigned after completing an action.
- UNASSIGN – triggered either automatically by the system or manually by a user (if the record is assigned to themselves or if the user has the appropriate permission).
Forms, Pages, and Fields
Event data is collected through Forms, which come in two types:
- Declaration Form – collects data about the event itself
- Action Form – collects data specific to a particular action, also known as annotation data in the system
Forms are composed of Pages, and pages are composed of Fields.
Fields can be shown, hidden, or enabled dynamically based on the values of other fields, allowing for a responsive and intuitive user experience.
To simplify configuration, we’ve introduced a set of helper functions:
defineDeclarationForm()
defineActionForm()
definePage()
defineFormPage()All of these are available in a type-safe manner via the new @opencrvs/toolkit npm package.
Conditionals & Validation
Validation has been significantly improved through the adoption of AJV and JSON Schema, providing standardized, robust, and extensible validation.
The field function (exported from @opencrvs/toolkit) includes a set of helpers for defining complex validation rules and conditional logic.
Available helpers include:
-
Boolean connectors:
and,or,not -
Basic conditions:
alwaysTrue,never -
Comparisons:
isAfter,isBefore,isGreaterThan,isLessThan,isBetween,isEqualTo -
Field state checks:
isFalsy,isUndefined,inArray,matches(regex patterns) -
Age-specific helpers:
asAge,asDob(to compare age or date of birth) -
Nested fields:
field('parent.field.name').get('nested.field').isFalsy()
The user object, also exported from @opencrvs/toolkit, includes helpers for user-based conditions such as:
user.hasScope()
user.hasRole()
user.isOnline()These conditions can control:
SHOW– whether a component is visibleENABLE– whether a component is interactiveDISPLAY_ON_REVIEW– whether a field appears on review pages
They can also be used to validate form data dynamically based on the current form state or user context.
Drafts
The new Drafts feature allows users to save progress on an event that has not yet been registered.
Drafts act as temporary storage for an action and are visible only to the user who created them.
Advanced Search
Advanced search is now configurable through the EventConfig.advancedSearch property, allowing different sections of an advanced search form to be defined.
You can search across:
-
Declaration Fields – using the same
fieldfunction from declaration forms with helpers such asrange,exact,fuzzy, andwithin -
Event Metadata – using the
eventfunction to search against metadata such as:trackingIdstatuslegalStatuses.REGISTERED.acceptedAtlegalStatuses.REGISTERED.createdAtLocationupdatedAt
More details about the metadata fields are available in packages/commons/src/events/EventMetadata.ts.
Deduplication
Event deduplication is now configurable per action via the EventConfig.actions[].deduplication property.
Helpers for defining deduplication logic—such as and, or, not, and field—are available from @opencrvs/toolkit/events/deduplication.
The field helper can reference declaration form fields and be combined with:
strictMatches()
fuzzyMatches()
dateRangeMatches()to define precise deduplication rules.
Greater Control over Actions
Each action now progresses through three possible states: requested, accepted, and rejected.
When a user performs an action, it is first marked as requested and forwarded to countryconfig via the /trigger/events/{event}/actions/{action} route, with the complete event details included in the payload.
Countryconfig has full control over how the action is processed and may choose to accept or reject the action either synchronously or asynchronously.
By hooking into these action trigger routes, countryconfig can also:
- Send customized Notifications
- Access the full event data at the time an action is performed
Configurable Workqueues
Workqueues can now be configured from countryconfig using the defineWorkqueues function from @opencrvs/toolkit/events.
This enables the creation of role- or workflow-specific queues without requiring code changes in core.
- The
actionsproperty is used to define the default actions displayed for records within a workqueue. - The
queryproperty is used to determine which events are included in the workqueue. - The
workqueue[id=workqueue-one|workqueue-two]scope is used to control the visibility of workqueues for particular roles.
Details on the available configuration options can be found in the WorkqueueConfig.ts file.
Event Overview
The configuration of the event overview page (formerly known as Record Audit) has been made customizable through the EventConfig.summary property.
The record details displayed on this page can be referenced directly from the declaration form or defined as custom fields that combine multiple form values. If some value contains PII data, they can optionally be hidden via the secured flag so that the data will only be visible once the record is assigned to the user.
Quick Search
The dropdown previously available in the search bar has been removed.
Any search performed through the Quick Search bar is now executed against common record properties such as names, tracking ID, and registration number by default, providing a more streamlined and consistent search experience.
Certificate Template Variables
The following variables are available for use within certificate templates:
$declaration– Contains the latest raw declaration form data. Typically used with the$lookupHandlebars helper to resolve values into human-readable text.$metadata– Contains theEventMetadataobject. Commonly used with the$lookuphelper for resolving metadata fields into readable values.$review– A boolean flag indicating whether the certificate is being rendered in review mode.$references– Contains reference data for locations and users, accessible via{{ $references.locations }}and{{ $references.users }}.
This is useful when manually resolving values from$declaration,$metadataoraction.
Handlebars Helpers
The following helpers are supported within certificate templates:
-
$lookup– Resolves values from$declaration,$metadata, oractiondata into a human-readable format. -
$intl– Dynamically constructs a translation key by joining multiple string parts.
Example:
OpenCRVS - v1.8.2
v1.8.1
Introduction
OpenCRVS v1.8.1 is a hotfix release that includes couple of new features and bug fixes based on the identified needs of countries using OpenCRVS. It is to be used in conjunction with a forked country configuration release v1.8.1
Bug fixes
- Inactive health facilities still appear in the Place of birth / death select #9311
- After migrating to v1.7 task history shows legacy system role rather than new role based on alias #9989
- Setup hardened CSP for client and login containers #9584
- Apostrophes in role names are generated but are not supported #10049
- Reconfigured Content Security Policy (CSP) to be more restrictive, enhancing protection against unauthorized content sources #9594
- Ensure that place of birth/death only shows active facilities/offices on the form #9311
- Limit year past record
LIMIT_YEAR_PAST_RECORDSforcing date of birth to start from the year 1900 has been addressed #9326