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

Persons with incomplete home addresses from different jurisdictions can not be merged #11017

Closed
adinaflorea9 opened this issue Nov 24, 2022 · 6 comments · Fixed by #11233 or #11363
Closed
Assignees
Labels
backend Affects the web backend bug An error or misbehavior of an existing feature (ticket type) major A functional requirement is incorrect or incomplete, ... (Severity for bugs/defects) persons qa-verified Issue has been tested and verified by QA

Comments

@adinaflorea9
Copy link

Problem Description

When using the person merge #5606 to try and merge persons that are from different jurisdictions (in their home address section) a warning appears if one of the persons has an incomplete home address.

A separate ticket has been created as in #5606 it was specified that information from the fields that are not filled in for the leading person should be filled with information from the discarded person. But it was not specified what should be done when the information is conflicting.

The scenario proposed considers 2 persons that are duplicates, one entry could be from a while ago when the person had an incomplete home address from jurisdiction 1, and the second entry for that person in their latest one, and has a complete home address from jurisdiction 2.

Steps:

  1. Create a person that has the following home address:
    image

  2. Create a second person that would be considered a duplicate of the one from step1, but use the following home address:
    image

  3. Try to merge the 2 persons and have the person from step 1 as the leading person;
    -> the merge is not possible, as the information from the community field from the discarded person can not be migrated into the leading person.
    image

Proposed Change

Two options for the proposed change:

  1. Would it be desired for the whole home address to be updated for the leading person when the home address information is from different jurisdictions (different districts, and/or different communities)?

  2. Would it be desired for the whole home address to be transferred into the leading person in the form of a 'New entry' in the 'Addresses' section of the leading person?

Acceptance Criteria

Implementation Details

Additional Information

@adinaflorea9 adinaflorea9 added vaadin-app Affects the Vaadin application needs-refinement Refinement or further specification required change A change of an existing feature (ticket type) persons labels Nov 24, 2022
@MateStrysewske MateStrysewske added bug An error or misbehavior of an existing feature (ticket type) backend Affects the web backend major A functional requirement is incorrect or incomplete, ... (Severity for bugs/defects) needs-refinement Refinement or further specification required and removed change A change of an existing feature (ticket type) needs-refinement Refinement or further specification required vaadin-app Affects the Vaadin application labels Dec 7, 2022
@MateStrysewske MateStrysewske added this to the Sprint 121 - 1.78.0 milestone Dec 7, 2022
@MateStrysewske
Copy link
Contributor

I consider this a bug because it seems like there's a problem in our implementation, specifically the implementation of location merging. We definitely can't use the logic "if it's empty in the leading entity, copy it over" for jurisdictions here because that will inevitably lead to issues like the one reported here.

We should refine this, but my suggestion would be to go with solution 2, i.e. if the home addresses don't match, copy the home address of the discarded person over to the other addresses of the leading person. Needs to be discussed with HZI though.

@adinaflorea9
Copy link
Author

@JaquM-HZI and @SahaLinaPrueger does the proposed solution number 2 seem suitable for you?

@SahaLinaPrueger
Copy link

SahaLinaPrueger commented Dec 7, 2022

I am not sure.

if the home addresses don't match

So that i understand:

  1. Would that mean that we check from country till facility name and description if the entry is identical?
  2. And if the entries are identical, just some field like community is missing then we add the field?
  3. And if the entries are not identical, for example because of a spelling mistake in the field facility name and description we copy the home address of the discarded person to the form 'new entry'?

First I thought: Nr. 2 is suitable for me. I was just not sure if it would be better to take home as address type or other address, and the description would be previous home address
image
image

Other address makes more sense, but we cannot translate previous home address, to other languages because it is a free-text field, right?

And then my second thought was:
We said that everything will be taken over that is empty in the leading person and written out in the discarded person, right? Maybe the user thinks (if we handle it with Solution Nr. 2) everything, that is different from the leading person will be attached somewhere else. Maybe we should say, if the home address do not match, then the home address in the discarded person will get lost. I will talk to my team about this.

@SahaLinaPrueger
Copy link

SahaLinaPrueger commented Dec 12, 2022

@adinaflorea9 We discussed this: We go with solution Nr. 2.
Address Type should be other address and address name / description should be: adopted from discarded person
Thank you for suggesting solution Nr. 2!

@sergiupacurariu sergiupacurariu self-assigned this Dec 14, 2022
@sergiupacurariu sergiupacurariu added this to Backlog in SORMAS Team 2 - DEV - Iteration Backlog via automation Dec 14, 2022
@sergiupacurariu sergiupacurariu moved this from Backlog to In Progress in SORMAS Team 2 - DEV - Iteration Backlog Dec 14, 2022
@sergiupacurariu sergiupacurariu removed the needs-refinement Refinement or further specification required label Dec 14, 2022
sergiupacurariu added a commit that referenced this issue Dec 21, 2022
@sergiupacurariu sergiupacurariu moved this from In Progress to Review in SORMAS Team 2 - DEV - Iteration Backlog Dec 21, 2022
sergiupacurariu added a commit that referenced this issue Jan 6, 2023
sergiupacurariu added a commit that referenced this issue Jan 10, 2023
…ictions can not be merged - changes after review
sergiupacurariu added a commit that referenced this issue Jan 10, 2023
…ictions can not be merged - changes after review
sergiupacurariu added a commit that referenced this issue Jan 10, 2023
…ictions can not be merged - changes after review
sergiupacurariu added a commit that referenced this issue Jan 10, 2023
…ictions can not be merged - changes after review
sergiupacurariu added a commit that referenced this issue Jan 10, 2023
…ictions can not be merged - changes after review
sergiupacurariu added a commit that referenced this issue Jan 10, 2023
…ictions can not be merged - changes after review
MateStrysewske pushed a commit that referenced this issue Jan 11, 2023
#11233)

* #11017 - Persons with incomplete home addresses from different jurisdictions can not be merged

* #11017 - Persons with incomplete home addresses from different jurisdictions can not be merged

* #11017 - Persons with incomplete home addresses from different jurisdictions can not be merged - changes after review

* #11017 - Persons with incomplete home addresses from different jurisdictions can not be merged - changes after review

* #11017 - Persons with incomplete home addresses from different jurisdictions can not be merged - changes after review

* #11017 - Persons with incomplete home addresses from different jurisdictions can not be merged - changes after review

* #11017 - Persons with incomplete home addresses from different jurisdictions can not be merged - changes after review

* #11017 - Persons with incomplete home addresses from different jurisdictions can not be merged - changes after review
SORMAS Team 2 - DEV - Iteration Backlog automation moved this from Review to Testing Jan 11, 2023
@adinaflorea9 adinaflorea9 self-assigned this Jan 11, 2023
@adinaflorea9
Copy link
Author

As discussed with @sergiupacurariu I am reopening the ticket due to the following scenarios:

I:

  1. Create 2 persons with the same home address (same region, district, and/or community) but different 'Facility category' and 'Facility type' - no new entry in 'Addresses' is created after merge

  2. Create 2 persons with the same home address (same region, district, and/or community), same 'Facility category' but different 'Facility type' - no new entry in 'Addresses' is created

  3. Create 2 persons with the same home address (same region, district, and/or community), same 'Facility category', same 'Facility type', but different 'Facility' - no new entry in 'Addresses' is created

  4. Create 2 persons with the same home address (same region, district, and/or community), same 'Facility category', same 'Facility type', but one person has an actual 'Facility' selected, and the other has 'Other Facility' and the field 'Facility name and description' filled in - no new entry in 'Addresses' is created

  5. Create 2 persons with the same home address (same region, district, and/or community), same 'Facility category', same 'Facility type', but 'Other Facility' is selected and the field 'Facility name and description' filled with two different values - no new entry in 'Addresses' is created

II:
1.
Person 1 - has the home address in region 1, district 1, community 1 + a facility that belongs to community 1
Person 2 - has the home address in region 1, district 1 + a facility that belongs to district 1
2. Keep person 2 (discard person 1)
-> on person 2 the facility is now set as 'inactive' and the community from person 1 'migrated' into person 2

@adinaflorea9 adinaflorea9 reopened this Jan 16, 2023
SORMAS Team 2 - DEV - Iteration Backlog automation moved this from Testing to In Progress Jan 16, 2023
sergiupacurariu added a commit that referenced this issue Jan 17, 2023
@sergiupacurariu sergiupacurariu moved this from In Progress to Review in SORMAS Team 2 - DEV - Iteration Backlog Jan 17, 2023
sergiupacurariu added a commit that referenced this issue Jan 17, 2023
SORMAS Team 2 - DEV - Iteration Backlog automation moved this from Review to Testing Jan 18, 2023
@adinaflorea9
Copy link
Author

Verified ticket on the local machine using the latest version of SORMAS from the development branch - 1.79.0-SNAPSHOT(2cbcbbe).

@adinaflorea9 adinaflorea9 added the qa-verified Issue has been tested and verified by QA label Jan 19, 2023
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) major A functional requirement is incorrect or incomplete, ... (Severity for bugs/defects) persons qa-verified Issue has been tested and verified by QA
Projects
None yet
5 participants