There's no error checking on the type of crm_contact when creating relationships

Created on 28 August 2025, about 1 month ago

Problem/Motivation

Right now we can't actually be certain that users won't create unexpected relationships. If we plan to do stuff like automation in the future we may want to add error checking to our core crm_contact relationships so we don't get confusing bugs because a power user got creative.

Steps to reproduce

- I create a Person contact with the given name "TestPerson1"
- I create a second Person contact with the given name "TestPerson2"
- I go to the Add Employment ~/crm/relationship/add/employee
- I type "TestPerson1" into the Employee field to get it to do a lookup, then copy that lookup and put it into the Organization field (AKA "TestPerson1 (crm_contact id)")
- I type "TestPerson2 into the Employee field to get it to do a new lookup
- I submit the form
- I see that I've successfully created an Employment relationship between 2 Person contacts

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

1.0

Component

Code

Created by

🇨🇦Canada speckles

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024