Loris icon indicating copy to clipboard operation
Loris copied to clipboard

[candidate_parameters] family table not updated

Open CamilleBeau opened this issue 4 years ago • 1 comments

Describe the bug If a family relationship between candidate A and candidate B is deleted in the Family Information tab of candidate_parameters from the profile of candidate A, the entry in the family table is deleted for candidate B only. The entry for this relationship for candidate A remains.

Then, if you add another family relationship from candidate A to candidate C with a different type (for example, the if the deleted relationship was "cousins", and the newly added relationship is "siblings"), there will be a mismatch in relationship type in the family table. The entry for candidate C in the new relationship will have the correct type in the family table, but the entry for candidate A will have the wrong relationship type from the deleted relation.

The result of this will be that from candidate A's Family information tab, candidate C will be listed as "siblings", but from candidate C's Family information tab, candidate A will be listed as "cousins".

To Reproduce Steps to reproduce the behavior (attach screenshots if applicable):

  1. With "Use family" enabled in configuration module, go to candidate parameters tab of a candidate (call this cand A)
  2. Create a family relation to another candidate (cand B)
  3. Delete the family relation that was just made.
  4. Check what remains in the family table for this relationship (there will be one entry for this FamilyID instead of two)
  5. Add another family relation from cand A to a different candidate (cand C) with a different relationship type (i.e., if first was "cousins" use something else)
  6. Check again what is in the family table, notice a mismatch.
  7. Navigate to Candidate Parameters module of cand C & check the family relation in the Family Information tab. Notice that it is different than what was added.

What did you expect to happen? Both entries for that FamilyID to be deleted in the family table, and the new relationship to have the same relationship type for both candidates.

CamilleBeau avatar Nov 16 '20 21:11 CamilleBeau

I just started looking through this issue and the FamilyID workings are more complex than I realized - Someone from a project who uses FamilyID might be more useful here. I think any changes that I make wouldn't be completely thought out in terms of what effect it would have on pre-existing projects.

CamilleBeau avatar Jan 29 '24 21:01 CamilleBeau