GIVEN I have the scope Revoke Registration
WHEN a record has the status Registered
THEN i can select Revoke registration form the action menu
GIVEN
WHEN
THEN
GIVEN I am performing an Advanced Search
WHEN I select the status
THEN I can select Revoked and search for revoke registrations
Tech tasks
REVOKED will become a new record status that the record can move to from a REGISTERED status.
Before a record is revoked
[ ] Implement a GET /actions endpoint to country config. This endpoint is used for serving core the configuration for different actions. See a reference response payload here.
[ ] Create a new directory for frontend actions: client/src/actions/. We are going to build new and move existing actions to this directory over time. For this task, create a new directory client/src/actions/. Define a new route /record/:id/actions/revoke to react-router for this.
[ ] Write a new hook const configuration = useActionConfiguration('revoke-record'). This hook should read country config's action definitions (through gateway) and store them for offline use. Use Apollo to fetch the data and persist to IndexedDB. Let's try and minimise the usage of redux moving forward and focus on writing reusable hooks.
[ ] You can use PrintRecord.tsx as a reference to how to build the new views on a high level. Use <FormFieldGenerator /> to define the different views and inputs this action has where possible.
[ ] Take configuration.form definition in use for the form. By default whatever the country defines here should be placed before the standard form. However, implement combining the forms in a manner that we leave an escape hatch for countries to override
const form = props.form.concat(DEFAULT_VIEWS_AND_INPUTS.filter(sectionNotIn(props.form)))
<FormFieldGenerator fields={form} />
[ ] Add a "Revoke record" action to actions in record view
[ ] Hide the revoke record action from anyone who doesn't have a revoke-records scope. Assign this scope by default to local and national registrars
[ ] Write gateway, workflow, search, metrics handlers for record revocation
[ ] Create a new client/src/actions/revoke/hooks.ts with a hook that can be called like this:
const { revoke } = useRevoke()
it triggers a GraphQL mutation sent to the Outbox. The caller of this method can then redirect the user to the home screen, but let's keep the actions themselves simple.
After a record is revoked
[ ] Add a "REVOKED" status to advanced search
Tests
[ ] Write an E2E test case(s) based on @SyedaAfrida 's test definition
How does Revoking a record affect the records behaviour and processes around it? Is it still visible in workqueues? Can it be searched for? Are there any UI implications?
Is the templated approach where we only allow capturing the "metadata" enough? There are some country requirements today for hiding or changing "Who's collection?" options or the options in who is making a correction e.g. https://github.com/opencrvs/opencrvs-core/issues/7057
Description
Once a record has been registered we need a mechanism to revoke it.
As it is possible for a Registrar to make a duplicate intentionally either because of a mistake or because they have been defrauded.
And as it is possible for a death registration to be made against an individual who has not actually died, either by mistake or fraudulently
This ticket is to:
Design
Status flow diagram: https://www.figma.com/board/MpIAfLSCAGAVKBbciSNHrT/Status-WorkFlow?node-id=1630-615&t=EulDkkq8ncWcuBZH-1 Template design with Farajaland configuration: TBD
ACs
GIVEN I have the scope Revoke Registration WHEN a record has the status Registered THEN i can select Revoke registration form the action menu
GIVEN WHEN THEN
GIVEN I am performing an Advanced Search WHEN I select the status THEN I can select Revoked and search for revoke registrations
Tech tasks
REVOKED
will become a new record status that the record can move to from aREGISTERED
status.Before a record is revoked
GET /actions
endpoint to country config. This endpoint is used for serving core the configuration for different actions. See a reference response payload here.client/src/actions/
. We are going to build new and move existing actions to this directory over time. For this task, create a new directoryclient/src/actions/
. Define a new route/record/:id/actions/revoke
to react-router for this.const configuration = useActionConfiguration('revoke-record')
. This hook should read country config's action definitions (through gateway) and store them for offline use. Use Apollo to fetch the data and persist to IndexedDB. Let's try and minimise the usage of redux moving forward and focus on writing reusable hooks.PrintRecord.tsx
as a reference to how to build the new views on a high level. Use<FormFieldGenerator />
to define the different views and inputs this action has where possible.configuration.form
definition in use for the form. By default whatever the country defines here should be placed before the standard form. However, implement combining the forms in a manner that we leave an escape hatch for countries to overriderevoke-records
scope. Assign this scope by default to local and national registrarsclient/src/actions/revoke/hooks.ts
with a hook that can be called like this:it triggers a GraphQL mutation sent to the Outbox. The caller of this method can then redirect the user to the home screen, but let's keep the actions themselves simple.
After a record is revoked
Tests