Skip to content

Fix link field subtype/class restriction config UI and editor enforcement#1121

Closed
Copilot wants to merge 2 commits into
2.3from
copilot/fix-comments-review-thread
Closed

Fix link field subtype/class restriction config UI and editor enforcement#1121
Copilot wants to merge 2 commits into
2.3from
copilot/fix-comments-review-thread

Conversation

Copilot AI commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

The three new MultiSelect widgets for asset/document/object subtypes in the Link class definition UI were missing name, value, and fieldLabel — so restrictions were never persisted or displayed. Additionally, the link editor panel (helpers.js) had no logic to enforce subtype or class filters during drag-and-drop or item selector search.

Changes

object/classes/data/link.js

  • Added fieldLabel, name, id, and value: this.datax.* to the three subtype MultiSelects so values are persisted and pre-populated
  • Map all plain string array stores (including existing allowedTypes, allowedTargets, disabledFields) to {text} objects so displayField/valueField: "text" resolve correctly

object/tags/link.js

  • Initialize config as {} instead of []
  • Build and forward allowedSubtypes (keyed by element type) and allowedClasses into the editor config

helpers.jsopenLinkEditPanel

  • Add SUBTYPES constant (asset/document/object search types, folders excluded)
  • Derive allowedSubtypes and allowedClasses from config
  • Introduce dndAllowed(data) to gate drag-and-drop on type + subtype + class
  • Pass subtype and specific.classes to the item selector search

translations/admin_ext.en.yaml

  • Add allowed_asset_subtypes, allowed_document_subtypes, allowed_object_subtypes keys (previously referenced but missing)

Copilot AI changed the title [WIP] Fix code based on review comments Fix link field subtype/class restriction config UI and editor enforcement Jun 29, 2026
Copilot AI requested a review from kingjia90 June 29, 2026 10:46
@sonarqubecloud

Copy link
Copy Markdown

@kingjia90 kingjia90 closed this Jun 29, 2026
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 29, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants