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

[Person merge] Merging or picking persons randomly leads to an error #12218

Closed
adinaflorea9 opened this issue Jun 28, 2023 · 2 comments · Fixed by #12249
Closed

[Person merge] Merging or picking persons randomly leads to an error #12218

adinaflorea9 opened this issue Jun 28, 2023 · 2 comments · Fixed by #12249
Assignees
Labels
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 vaadin-app Affects the Vaadin application

Comments

@adinaflorea9
Copy link

adinaflorea9 commented Jun 28, 2023

Bug Description

When trying to merge or pick person with a regular Admin+NatUser the merge or pick sometimes results in an error. I could not determine what causes this as sometimes with similar persons the error is not reproducible and with other it is.

Reproduction Steps

  1. Logged in with an Adnim+NatUser enter the bulk edit mode in the 'Persons' directory;
  2. Randomly select persons for the merge;
  3. In the window 'Pick or merge persons' select one of the persons and click 'Pick' or 'Merge';
  4. In the 'Pick or merge person confirmation' click 'Confirm'.
    Actual behavior: an error appears.
    image

Logs from the local machine:
merge persons error .txt

Expected Behavior

No error should appear and the merge or pick action should be successful.

Affected Area(s)

Web app

SORMAS Version

1.86.0-SNAPSHOT(8988ace)

Android version/Browser

Chrome

User Role(s)

Admin+NatUser

Server URL

local machine

Additional Information

No response

@adinaflorea9 adinaflorea9 added bug An error or misbehavior of an existing feature (ticket type) vaadin-app Affects the Vaadin application persons major A functional requirement is incorrect or incomplete, ... (Severity for bugs/defects) labels Jun 28, 2023
@MateStrysewske MateStrysewske self-assigned this Jun 28, 2023
MateStrysewske added a commit that referenced this issue Jul 5, 2023
@MateStrysewske
Copy link
Contributor

Fixed this by actually creating a new location entity when merging persons instead of just copying the location over to the lead person (because this leads to the same location being used twice). It's possible that this will still not work for existing persons that already have been merged with others (because in this case, locations might already be referred twice in the database).

MateStrysewske added a commit that referenced this issue Jul 6, 2023
MateStrysewske added a commit that referenced this issue Jul 6, 2023
sergiupacurariu added a commit that referenced this issue Jul 7, 2023
…merge_address_issue

#12218 - Copy address on merge
@adinaflorea9 adinaflorea9 self-assigned this Jul 7, 2023
@adinaflorea9
Copy link
Author

Verified ticket on the local machine using the latest version of SORMAS from the development branch - 1.86.0-SNAPSHOT(19d39a6).

An error still appears for 4 persons from my DB - this could not so far be reproduced with other persons or addresses associated with other persons and the investigation will be treated in a separate ticket.

@adinaflorea9 adinaflorea9 added the qa-verified Issue has been tested and verified by QA label Jul 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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 vaadin-app Affects the Vaadin application
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants