Skip to content

Custom Objects tab: complete relationship resolution (1:1, 1:n, n:m) + menu-scoped tabs + link-table abstraction #618

Description

@christianbur

Plugin Version

0.6.x

Proposed functionality

This feature request is a follow-up for the new Custom Objects tab and consolidates the intent from #612 and #578, aligned with maintainer feedback to extend the new tab behavior.

Requested behavior:

  1. Relationship coverage in the new tab:
  • 1:1 relationships should show reverse links on both sides.
  • 1:n relationships should show reverse links on both sides.
  • n:m relationships should support explicit link-table/link-type modeling and render logical target objects instead of intermediate technical rows.
  • Current problem: if object A references object B, the relationship may be visible on B as an incoming link, but the corresponding reverse view from A back to B is not shown consistently. In practice, A -> B can be visible while B -> A is missing in the tab, so users cannot rely on the UI for symmetric relationship discovery.
  1. Explicit link-table indicator:
  • Add field-level metadata (example: link_table=true) to declare that a relation is implemented via an intermediate COT.
  • When enabled, the tab should resolve and display direct logical endpoints.
  • Intermediate link objects should be hidden by default (optional technical drill-down can remain available).
  1. Flexible target types for link-table fields:
  • For link-table/link-type fields, allow linking to all NetBox object types.
  • This is important because COT field type immutability makes later refactoring expensive, and otherwise new target types from Custom Objects or other plugins can only be linked with substantial follow-up effort.
  • Needed for cross-domain links (IPAM/DCIM/Virtualization/Tenancy/custom objects).
  1. Menu-scoped tabs for linked objects (integration with Add support for custom menus for Custom Object Types (COTs) #610):
  • Keep the default Custom Objects tab for COTs without menu_name.
  • Create additional linked-object tabs per menu_name.
  • If an object is linked from multiple menus, render multiple tabs.
  1. Add button on the tab:
  • The linked-objects tab should provide an Add button so users can create a new related object directly from the current context.
  • The action should preserve the current host object as context, so the new relationship can be created with minimal manual input.

Related issues:

Use case

As Custom Object usage grows across multiple domains/projects, operators need predictable and symmetric relationship visibility from detail pages.

This proposal improves:

  • Impact analysis (who references what)
  • Reverse navigation (from target back to source)
  • Usability in n:m models where link objects are technical implementation details
  • Scalability of the UI via menu-based tab separation instead of one overloaded tab

Without these capabilities, relationship discovery is incomplete and operational workflows become error-prone.

External dependencies

None.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions