Skip to content

Remove current item from UMB_ANCESTORS_ENTITY_CONTEXT when consumed within workspace#19214

Closed
madsrasmussen wants to merge 4 commits intorelease/16.0from
v16/hotfix/remove-self-from-ancestor-entity-context-when-in-workspace
Closed

Remove current item from UMB_ANCESTORS_ENTITY_CONTEXT when consumed within workspace#19214
madsrasmussen wants to merge 4 commits intorelease/16.0from
v16/hotfix/remove-self-from-ancestor-entity-context-when-in-workspace

Conversation

@madsrasmussen
Copy link
Copy Markdown
Member

@madsrasmussen madsrasmussen commented May 1, 2025

The UMB_ANCESTORS_ENTITY_CONTEXT contains the current entity as the last item when used within a workspace context. This is not true when accessed in the tree or a collection item.

To ensure consistency in the data provided, we now only apply the actual ancestors of the current entity.

@madsrasmussen madsrasmussen marked this pull request as ready for review May 1, 2025 19:49
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refines the ancestor context for workspace usage by ensuring that the current entity is excluded from the ancestors array.

  • Introduces a fallback value for isNew using the nullish coalescing operator.
  • Refactors the ancestor mapping logic and extracts the ancestor filtering into a separate private method.
  • Filters out the current entity from the ancestors list to maintain consistency.

@madsrasmussen
Copy link
Copy Markdown
Member Author

Closing this PR as it will be included in #19172

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants