opencrvs / opencrvs-core

A global solution to civil registration
https://www.opencrvs.org
Other
90 stars 73 forks source link

As a user from another country I want to see names in a format that we use so that they reflect my cultural norms #6830

Open euanmillar opened 7 months ago

euanmillar commented 7 months ago

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

Image

  1. When logged in as a national system administrator user you can create new users in offices. The create new user form is not currently configurable and we have no plans to make it configurable. However, as we often receive requests from countries to have the surname first in this form, we have decided to satisfy that requirement by putting surname first for ALL countries.

We also want to remove the question that asks the user for a national ID number in this form as it is not required.

How citizen data appears in the team user list, work queues and record audit

Image

Image

  1. 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 appropriately

    • [x] Create new copy item constants.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}
    • [x] Refactor generateName in packages/client/src/utils/data-formatting.ts so that it respects the name format defined in the team user list view

Other applications

euanmillar commented 7 months ago

Decision needs to be made if name configuration is decoupled from the rest of registration form configuration.

rikukissa commented 5 months ago

@euanmillar ticket updated. Can be unblocked and moved to Ready to build

rikukissa commented 5 months ago

Updated task description to include configurable name formatting elsewhere in the app as Burkina Faso needs this

euanmillar commented 4 months ago

@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

rikukissa commented 4 months ago

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