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

All Visits of Contacts of the same Person are deleted when permanent deletion is triggered for one of the Contacts, if there's a distance of >30 days between their Report Dates #10622

Closed
roxanamlendea opened this issue Oct 13, 2022 · 1 comment · Fixed by #10640
Assignees
Labels
backend Affects the web backend bug An error or misbehavior of an existing feature (ticket type) contacts major A functional requirement is incorrect or incomplete, ... (Severity for bugs/defects) qa-verified Issue has been tested and verified by QA

Comments

@roxanamlendea
Copy link

roxanamlendea commented Oct 13, 2022

Bug Description

When 2 Contacts are created for the same Person and the distance between their Report Dates exceeds the threshold of 30 days, when the automatic deletion is triggered for one of the Contacts, all their Visits are deleted.

The issue is not reproducible when both Contacts have the same Report Date and Last Contact Date;

Steps to Reproduce

  1. Create Contact no. 1 with the Report Date and Last Contact Date for 01 July;
  2. Add Visit no. 1 with the date 01 July;
  3. Create Contact no. 2 for the same Person with the Report Date and Last Contact Date set to the current date;
  4. Add Visit 2 no. 2 for Contact no. 2 with date set to the current date;
  5. Trigger automatic deletion for Contact no. 1;

Actual Behavior

Both Visits get deleted;

Expected Behavior

Only Visit no. 1 should get deleted;

Screenshots

System Details

  • Device: Windows 10
  • SORMAS version: discovered on the current version of Sormas 1.76.0-SNAPSHOT, but it is probably an older issue (I don't have access to the DB and the CronService.java file of the release instances, so I couldn't test there)
  • Android version/Browser: Chrome
  • Server URL: local instance
  • User Role: admin + national user

Additional Information

I found this issue while testing ticket #9666

@roxanamlendea roxanamlendea added bug An error or misbehavior of an existing feature (ticket type) contacts backend Affects the web backend major A functional requirement is incorrect or incomplete, ... (Severity for bugs/defects) labels Oct 13, 2022
@JaquM-HZI JaquM-HZI added this to the Sprint 120 - 1.77.0 milestone Oct 13, 2022
sergiupacurariu added a commit that referenced this issue Oct 14, 2022
…ermanent deletion is triggered for one of the Contacts, if there's a distance of >30 days between their Report Dates
sergiupacurariu added a commit that referenced this issue Oct 14, 2022
…ermanent deletion is triggered for one of the Contacts, if there's a distance of >30 days between their Report Dates - update case visits delete permanent test
sergiupacurariu added a commit that referenced this issue Oct 14, 2022
…ermanent deletion is triggered for one of the Contacts, if there's a distance of >30 days between their Report Dates - update case visits delete permanent test - review changes
@sergiupacurariu sergiupacurariu self-assigned this Oct 14, 2022
@roxanamlendea roxanamlendea self-assigned this Oct 17, 2022
@roxanamlendea roxanamlendea added the qa-verified Issue has been tested and verified by QA label Oct 20, 2022
@roxanamlendea
Copy link
Author

Verified ticket on local setup using the latest version of Sormas 1.77.0-SNAPSHOT (53a4a24).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Affects the web backend bug An error or misbehavior of an existing feature (ticket type) contacts major A functional requirement is incorrect or incomplete, ... (Severity for bugs/defects) qa-verified Issue has been tested and verified by QA
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants