Skip to content

Add Automatic Approval for OpenSPP Self-Reg Change Requests #763

@jannahadlaon

Description

@jannahadlaon

Describe the bug
Postman:
Unable to approve CR endpoint via postman.

APK Build:
Waiting on additional Farmer registry fix by @emjay0921 to proceed with the build creation

To Reproduce

  1. Import postman collection from dev in postman
  2. Add Farmer Change Request
  3. Send a Create Request Detail - Farmer Request using the result from step 2 - this will create an empty farmer.
  4. Check res_id from step 3, use it in the Modify Farmer Request to update the farmer data.
  5. Using the result from step 2, Approve CR
  6. Log in as admin in HDM instance and verify that the CR is approved and applied. - see issue here

Expected behavior
Add a function to the Change Request module that will be used by the OpenSPP Self-Reg. The submission of Change Requests (CRs) from OpenSPP Self-Reg will be processed as follows:

  • Accept CRs only from users belonging to the "Change Request External API" group.
  • Validate the CR input data.
  • Skip the validation of required attachments.
  • Automatically approve the CR after the input data has been validated.

With this new function the submissions of CRs will have the following results:

  • CRs from the OpenSPP Self-Reg submitted by users of the "Change Request External API" group will be automatically approved upon execution of the validation of input data.
  • All other CRs will follow the standard validation and approval process.

Screenshots

Image

Additional context
Related to #635

🔔 Note: This ticket should address common considerations without including country-specific content. Please ensure all references are generic and applicable across various contexts.

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions