Open euanmillar opened 7 months ago
Decision needs to be made if name configuration is decoupled from the rest of registration form configuration.
@euanmillar ticket updated. Can be unblocked and moved to Ready to build
Updated task description to include configurable name formatting elsewhere in the app as Burkina Faso needs this
@rikukissa if we are doing this: "Ensure possible NIDs are removed from user-mgnt.users collection" wont we need a database migration? I wonder if it is worth the effort. It might be acceptable to just leave the national id prop in the database than maintain the migration file. Just an idea
Good point, I'll update the task description. Long-term it's best if we aim to always have the database and data integrity in tip-top shape, so definitely worth writing a migration
Description
OpenCRVS is hardcoded to display names with family name appearing last in many places: {firstName} {middleName} {lastName}.
But in many countries surname appears first so this should be configurable in record audit and other places for example.
This ticket describes 2 changes that we need to make.
Tech tasks
National System Admin – Create user form
We also want to remove the question that asks the user for a national ID number in this form as it is not required.
user-mgnt.users
collection. Write a migration to remove the field from existing users.How citizen data appears in the team user list, work queues and record audit
If we create a content management key called
constants.humanName
with a default value{firstName} {lastName}
, then the client could read this content key and dynamically choose to represent names in work queues and record audit according to it. If the content key was like this:{lastName} {middleName} {firstName}
then the names could be rendered appropriatelyconstants.humanName
with a default value{firstName} {lastName}
and start using it in the admin view's user listing. Keep in mind that this same constant is to be used for rendering record subject names so for instance a country might want to have this as{lastName} {middleName} {firstName}
generateName
in packages/client/src/utils/data-formatting.ts so that it respects the name format defined in the team user list viewOther applications
{lastName} {middleName} {firstName}
properly applies everywhere such as work-queues and record audit.