Skip to content

Fix "Select All" in Relationship field to exclude already-related (disabled) content #35325

@adrianjm-dotCMS

Description

@adrianjm-dotCMS

Problem Statement

When configuring a One-to-Many relationship field in the New Content Editor, content items that are already related to another content are correctly shown as disabled in the relationship picker table (expected behavior). However, clicking "Select All" in that table also selects the disabled items, allowing them to be incorrectly included in the relationship.

This is a UI-level bug in the Angular-based New Content Editor.

Steps to Reproduce

Or detailed steps:

  1. Open the New Content Editor for a content type that has a One-to-Many relationship field.
  2. In the relationship field picker, ensure that at least one content item is already related to another content (it will appear as disabled/grayed out).
  3. Click "Select All" in the picker table.
  4. Observe that the disabled (already-related) items are selected alongside the enabled ones.
Screen.Recording.2026-04-15.at.10.21.57.AM.mov

Expected result: Only non-disabled (available) items are selected; disabled items remain unselected.

Actual result: All items — including disabled ones — are selected when "Select All" is clicked.

Acceptance Criteria

  • Clicking "Select All" in the relationship field picker selects only non-disabled (available) items.
  • Disabled items (already related to another content) remain unselected after "Select All" is clicked.
  • If all items in the table are disabled, clicking "Select All" results in zero items selected.
  • If no items are disabled, clicking "Select All" selects all items (existing behavior unchanged).
  • The original bug scenario — clicking "Select All" causes disabled items to become selected — no longer reproduces in the New Content Editor.
  • Saving a One-to-Many relationship after using "Select All" works correctly.

dotCMS Version

Latest from main branch

Severity

Medium - Some functionality impacted

Links

NA

Metadata

Metadata

Assignees

Type

Projects

Status

Current Sprint Backlog

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions