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

Duplicates: User account connection lost when merging people #2333

Open
richardolsson opened this issue Nov 8, 2024 · 0 comments
Open

Duplicates: User account connection lost when merging people #2333

richardolsson opened this issue Nov 8, 2024 · 0 comments
Labels
🐜 bug Something isn't working 🐬 Medium Just a nice sized issue. 🎨 needs-design

Comments

@richardolsson
Copy link
Member

Description

"Person" records and user accounts in Zetkin are two separate things. But person objects in Zetkin can be connected to user accounts (which are managed separately, and not by any single organization).

Sometimes, for a number of reasons, situations can arise where the same physical person is represented by two separate person records in an organization. We call these "duplicates", and functionality exists for merging duplicates into a single person record where all connected data (tags, event participation, calls etc) are consolidated into the merged record. There's UI for configuring the merge, and the IDs of the person records are then sent to the backend, that merges the data.

When this merge happens, the connection between person record and user is handled such that the connection of the first person in the merge is kept. This means that the order in which IDs are sorted when submitting them to the backend matters, but there is currently no UI for controlling this.

Steps to reproduce

  1. Go to https://app.dev.zetkin.org/organize/1/people/4
  2. Click on the ellipsis menu in the top right corner
  3. Pick "Merge with…"
  4. Search and find any other person (with the same name or otherwise) to merge
  5. With the network panel open, click "Merge" – the records will be merged

Expected Behaviour

Before merging, there should be some way to pick which of the two person records should be used as the "main" object, the user connection of which will be kept. There are basically three cases that all need to be handled:

A. A merge is configured with 2+ people, where only the first is connected to a user account
B. A merge is configured with 2+ people, where only one connected to a user account and it's not the first one
C. A merge is configured with 2+ people, where multiple records are connected to user accounts

UI should be introduced that accommodates all of these situations, and affects the order in which IDs are submitted to the API.

Actual Behaviour

The person is merged with ID 4 as the main (first entry in the objects array), and at no point during steps 4-5 is the user allowed to pick which of the two objects should be the main.

Screenshots (if you have any)

Step 3

image

Step 4

image

Step 5

image

@richardolsson richardolsson added 🐜 bug Something isn't working 🎨 needs-design 🐬 Medium Just a nice sized issue. labels Nov 8, 2024
@ziggabyte ziggabyte changed the title User account connection lost when merging people Duplicates: User account connection lost when merging people Nov 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐜 bug Something isn't working 🐬 Medium Just a nice sized issue. 🎨 needs-design
Projects
None yet
Development

No branches or pull requests

1 participant