Loris
Loris copied to clipboard
[candidate_parameters] family table not updated
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):
- With "Use family" enabled in configuration module, go to candidate parameters tab of a candidate (call this cand A)
- Create a family relation to another candidate (cand B)
- Delete the family relation that was just made.
- Check what remains in the
family
table for this relationship (there will be one entry for this FamilyID instead of two) - 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)
- Check again what is in the
family
table, notice a mismatch. - Navigate to
Candidate Parameters
module of cand C & check the family relation in theFamily 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.
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.