openspp-modules icon indicating copy to clipboard operation
openspp-modules copied to clipboard

Add validation in Import Group for Farmer registry

Open anthonymarkQA opened this issue 1 year ago • 3 comments

Describe the bug An "unnamed" member is automatically created under the group , when importing a group with no memmbers To Reproduce

  1. Go to Farmer registry QA
  2. Login as admin
  3. Click on Groups
  4. Click the gear icon then click "Import records"
  5. Click on Upload file and select the file attached from this ticket
  6. Go back to groups and check the group you have imported,
  7. go to "members" tab and notice there is "unnamed" individual created and assigned as head automatically

Expected behavior raise error message and prevent import when importing group with no head member in farmer registry Screenshots image

Additional context Contact (res.partner) - 2024-08-13T160654.164.xlsx

anthonymarkQA avatar Aug 13 '24 08:08 anthonymarkQA

Findings: Returned to DEV

Prerequisite: upgrade module "spp_farmer_registry_base"

The solution works, however, user has to put "is_group" header for the validation to check the imported file. so that the unnamed member will not be created .

Expected: Put the validation in the import page for GROUPS without the need for "is_group" header. image Add in the error message farmer_given_name and farmer_family_name must be present in the excel file. Apply for FARMER REGISTRY>groups only.

anthonymarkQA avatar Sep 03 '24 08:09 anthonymarkQA

Findings: Returned to DEV

This fix should be applied for group import in farmer registry only as indicated. Currently it got unexpectedly applied for Import Individual for farmer registry as well.

anthonymarkQA avatar Sep 13 '24 06:09 anthonymarkQA

Findings: QA Passed Verified in QA farmer registry base instance

  • Able to import individual in farmer registry without farmer_given_name and Farmer_family_name validation erros - PASS image

  • Able to trigger error message "farmer_given_name and farmer_family_name must be present in the excel file." when both fields are missing from the excel. - PASS image

anthonymarkQA avatar Sep 24 '24 09:09 anthonymarkQA