Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DEA] Deleting enrolment and encounter #1180

Closed
Tracked by #1557 ...
Gojo-Taqi opened this issue Mar 22, 2024 · 4 comments
Closed
Tracked by #1557 ...

[DEA] Deleting enrolment and encounter #1180

Gojo-Taqi opened this issue Mar 22, 2024 · 4 comments
Assignees

Comments

@Gojo-Taqi
Copy link

Gojo-Taqi commented Mar 22, 2024

https://avni.freshdesk.com/a/tickets/4546

Describe the bug
When a user tries to void an individual with active encounters, enrolments, and program_encounters, a big error pops up causing the user confusion.

To Reproduce

  1. Register an individual, enroll it into a program, and try to have encounters planned as well.
  2. Try to void the individual
  3. You must see a big modal pop like the below screenshot.
    Image
  4. Because of the stack trace the user panics and seeks out help from the support team.
    A similar kind of error comes when there are active encounters and program_encounters present.

Issue link: https://drive.google.com/file/d/1PgWC0iuG-CUxuPnuJdo6J9uAiDaM2vE_/view?usp=drive_link

As is:

  • In DEA, an individual can't be deleted(voided) without voiding its encounters and program enrolments.
  • There is no way to delete enrolment and encounter in mobile. Anyways it does help when a user has done something wrong. So lets keep it in DEA.
  • In mobile when we void an individual, its encounters and enrolments are not voided, but feels like thats not correct, and need to be fixed.

AC:

  • Void an individual as well in DEA without voiding its enrolments and encounters like in mobile app and user should not be asked to void them as well
  • So when clicking on DELETE on enrolment in DEA should void the enrolment alone without voiding its encounters.
  • Allow voiding of enrolment and registration only if the beneficiary is in the sync zone of the user (catchment, attributes, etc) like in other places in DEA

Analysis notes:

  • Unable to find a reason to retain the current behaviour of voiding in DEA: source card for this behavior
  • if we void all the related entities anyways for the existing data still history will be present and in users mobile data all data might not be present
  • Which means need to do as a server BG job
  • Even if done above, need to check for voided to make sure, so no advantage of voiding all the related entities.
  • should else auto void all related entities like group/household members, eligibility, etc., - if a individual has 1000 encounters - what 'll happen if user closes the app when it is happening, how long will it take?
  • Also the above is simple - cases like same member should not be part of more than one group will come - in such cases voiding and unvoiding might need to deal with complex cases.
@Gojo-Taqi Gojo-Taqi moved this to New Issues in Avni Product Mar 22, 2024
@mahalakshme mahalakshme added the good first issue Good for newcomers label Mar 22, 2024
@mahalakshme mahalakshme changed the title User friendly error messages [DEA] Deleting enrolment and encounter Mar 29, 2024
@mahalakshme
Copy link
Contributor

@vinayvenu review the as is and to be above. Will change the headings, just wanted to check with you.

@mahalakshme mahalakshme moved this from New Issues to In Analysis Review in Avni Product Sep 18, 2024
@mahalakshme mahalakshme moved this from In Analysis Review to Ready in Avni Product Sep 23, 2024
@mahalakshme mahalakshme removed the good first issue Good for newcomers label Sep 23, 2024
@petmongrels petmongrels self-assigned this Sep 26, 2024
petmongrels added a commit to avniproject/avni-server that referenced this issue Sep 27, 2024
…ts as it cannot be ensured in Avni. removed unused code.
@petmongrels petmongrels moved this from In Progress to Code Review Ready in Avni Product Sep 27, 2024
@1t5j0y 1t5j0y moved this from In Code Review to QA Ready in Avni Product Oct 3, 2024
@dinesh2096 dinesh2096 self-assigned this Oct 17, 2024
@avniproject avniproject deleted a comment from Dinesh2019 Oct 18, 2024
@dinesh2096
Copy link

Suggestion can we have the error message as given below

suggested one : Not in this user's catchment
Already existing in the system : notInThisUsersCatchment

@dinesh2096 dinesh2096 moved this from In QA to QA Failed in Avni Product Oct 18, 2024
@himeshr
Copy link
Contributor

himeshr commented Oct 22, 2024

@dinesh2096 Getting the correct error now, might have been a missing / overwritten translations issue.
Screenshot 2024-10-22 at 5 41 26 PM

@himeshr himeshr moved this from In Progress to QA Ready in Avni Product Oct 22, 2024
@dinesh2096
Copy link

QA Reference video :

Click here to watch the video

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

6 participants