twenty
twenty copied to clipboard
If an object is disabled, then the relationships to that object should be disabled
Just noticed that if you disable an object, the relationships to that object are still visible.
It doesn't really make sense to keep them... We should either check that when displaying to hide them, or changing isActive
on the fieldMetadata directly (but that kind of causes of loss of information because if we restore the object we will have to restore all relationship fields, even the previously disabled ones)
Related to that: the links to those relationship is still there but will give a 404 if the object is deactivated
Here is the GitStart Ticket for this issue: https://clients.gitstart.com/twenty/5449/tickets/TWNTY-5370
Some additional context here
Fields belong to an object and come with different types (Text, Boolean, Json...) and activation status through the boolean column isActive. When a field is deactivated, it is removed from the views it was featured in. It is possible to create a field of type "relation" to create a relationship between two objects (ex: People belong to a Company thanks to the standard field "person" of type Relation with standardId 20202020-3213-4ddf-9494-6422bcff8d7c). When an object is disabled, we should deactivate te relation.
QA:
- relation field is disabled
- relation field is not showing in the views anymore