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

Add validation when deleting a value from group tab of Individuals page

Open anthonymarkQA opened this issue 1 year ago • 1 comments

Describe the bug In Groups tab of Individual page, when deleting the link of individual to a group while the individual is the head of that group, the individual will remain as head of the farmer group from Groups page despite being removed already from individuals page.

To Reproduce

  1. In QA Farmer registry, go to >registry> individuals
  2. Select an Individual which is currently a HEAD of a farmer group then click
  3. In Groups tab, click on Delete icon beside the group
  4. Go to Registry> Groups and select the group the individual previously belongs to
  5. Notice in farmer details tab, the individual's details is still present
  6. Notice in Members tab, the head of farmer group is already removed.

Expected behavior In Groups tab of Individual page, a validation error message should appear when attempting to delete a group if the individual is currently the HEAD of that Farmer group. Screenshots Image

Additional context

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

anthonymarkQA avatar Sep 13 '24 02:09 anthonymarkQA

Estimate Dev Time

Optimistic: 4 hours Pessimistic: 8 hours

reichie020212 avatar Sep 13 '24 05:09 reichie020212

Verified and working as expected.

Test Steps:

  1. Install farmer registry demo module
  2. Go to Registry -> Farm and create a farm
  3. Go to Individual and enter the individual record
  4. Go to Groups tab
  5. Make sure that the individual is the head of the farmer
  6. Delete the record in the groups tab then save.
  7. Check if there is an error.
  • Group tab and then delete group via the delete icon: image

  • After group deletion: image

  • Error message when trying to exit the individuals tab without a HH head: image

anjclarise avatar Oct 27 '24 09:10 anjclarise