Determine which Relationship Types (if any) should be locked

Created on 21 May 2025, about 2 months ago

Problem/Motivation

Having some well-known Relationship Types would facilitate a stronger ecosystem of modules extending CRM because they could rely on the presence of specific Relationship Types.

Steps to reproduce

Proposed resolution

Remaining tasks

  • Determine which, if any, Relationship Types should be locked, including possible introduction of additional Relationship Types
  • Identify steps required to implement and update IS

User interface changes

API changes

Data model changes

πŸ“Œ Task
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States jdleonard Austin, TX, USA

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

Comments & Activities

  • Issue created by @jdleonard
  • πŸ‡ΊπŸ‡ΈUnited States bluegeek9

    I think it is good to be able to lock relationship types.

    I don't think any of the current relationships need to be locked.

  • πŸ‡ΊπŸ‡ΈUnited States jdleonard Austin, TX, USA

    Contrived example coming up! Let's say I want to create a family tree (and there's no missing links). I create a module that can traverse sibling and parent Relationships to generate a tree visual. That task is easier (and can benefit from existing data if any) if Sibling and Parent Relationship Types have well-known IDs and are known to be present. CRM could do that.

    The (good) reason I can think of to not do so is to not force the presence of the Relationship Types upon end users. Perhaps it would also be helpful to have a Relationship Type base field "Hidden from UI" or "Disabled" or something like that. A way to "get this out of my way" while maintaining its presence for any modules that depend on it.

    I'm not full throated on this. A decision on it could certainly be postponed.

  • πŸ‡ΊπŸ‡ΈUnited States bluegeek9

    I think there is a need to lock Contact types, individual and Organization.

    I do not think we need to lock relationship types. If there is an relationship of that type, the type cannot be deleted.

    Core doesn't force content types.

    The contact types are required for basic functionality. Membership requires Organization and Individuals. CRM User needs Individual.

  • πŸ‡ΊπŸ‡ΈUnited States bluegeek9

    To recap my position:

    We provide a lock mechanism, but we do not lock any relationship types.

    If a module need a relationship type locked, it can be done during hook_install.

  • πŸ‡ΊπŸ‡ΈUnited States jdleonard Austin, TX, USA

    I don't feel strongly about this at present. It can always be tweaked later. I'll proactively WF this though I think there's value to be had.

Production build 0.71.5 2024