Skip to content

Document Recycle Bin: Remove non-relevant entity bulk actions (closes #20677)#20685

Merged
AndyButland merged 1 commit intomainfrom
v17/bugfix/remove-non-relevant-actions-for-trashed-entities
Oct 30, 2025
Merged

Document Recycle Bin: Remove non-relevant entity bulk actions (closes #20677)#20685
AndyButland merged 1 commit intomainfrom
v17/bugfix/remove-non-relevant-actions-for-trashed-entities

Conversation

@madsrasmussen
Copy link
Contributor

Fixes #20677

Introduces the UMB_ENTITY_IS_NOT_TRASHED_CONDITION_ALIAS to various document-related bulk action manifests, ensuring actions like duplicate, move, publish, unpublish, and trash are only available for entities that are not already in the recycle bin.

Introduces the UMB_ENTITY_IS_NOT_TRASHED_CONDITION_ALIAS to various document-related bulk action manifests, ensuring actions like duplicate, move, publish, unpublish, and trash are only available for entities that are not already in the recycle bin.
Copilot AI review requested due to automatic review settings October 30, 2025 10:44
Copy link
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 adds a condition to prevent certain document bulk actions from being available on trashed items by adding the UMB_ENTITY_IS_NOT_TRASHED_CONDITION_ALIAS condition to multiple manifest files.

Key changes:

  • Adds the "is not trashed" condition to document bulk actions (trash, publish, unpublish, move, duplicate)
  • Ensures these actions are only available for non-trashed documents
  • Imports the condition constant from the recycle-bin package

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/Umbraco.Web.UI.Client/src/packages/documents/documents/recycle-bin/entity-action/bulk-trash/manifests.ts Adds is-not-trashed condition to bulk trash action
src/Umbraco.Web.UI.Client/src/packages/documents/documents/publishing/unpublish/entity-bulk-action/manifests.ts Adds is-not-trashed condition to unpublish bulk action
src/Umbraco.Web.UI.Client/src/packages/documents/documents/publishing/publish/entity-bulk-action/manifests.ts Adds is-not-trashed condition to publish bulk action
src/Umbraco.Web.UI.Client/src/packages/documents/documents/entity-bulk-actions/move-to/manifests.ts Adds is-not-trashed condition to move bulk action
src/Umbraco.Web.UI.Client/src/packages/documents/documents/entity-bulk-actions/duplicate-to/manifests.ts Adds is-not-trashed condition to duplicate bulk action
src/Umbraco.Web.UI.Client/src/packages/documents/documents/collection/action/manifests.ts Adds is-not-trashed condition to collection create action
Comments suppressed due to low confidence (1)

src/Umbraco.Web.UI.Client/src/packages/documents/documents/entity-bulk-actions/move-to/manifests.ts:8

  • The external import from '@umbraco-cms/backoffice/recycle-bin' is placed before relative imports, violating the project's ESLint import order rule. According to the eslint.config.js, imports should be ordered as: builtin, parent, sibling, index, external. Move this import to after the relative imports, grouped with the other '@umbraco-cms/backoffice' import on line 8.
import { UMB_ENTITY_IS_NOT_TRASHED_CONDITION_ALIAS } from '@umbraco-cms/backoffice/recycle-bin';
import { UMB_DOCUMENT_COLLECTION_ALIAS } from '../../collection/constants.js';
import { UMB_DOCUMENT_ENTITY_TYPE } from '../../entity.js';
import { UMB_DOCUMENT_TREE_ALIAS } from '../../tree/manifests.js';
import { UMB_USER_PERMISSION_DOCUMENT_MOVE } from '../../user-permissions/document/constants.js';
import { UMB_BULK_MOVE_DOCUMENT_REPOSITORY_ALIAS } from './repository/constants.js';
import { manifests as repositoryManifests } from './repository/manifests.js';
import { UMB_COLLECTION_ALIAS_CONDITION } from '@umbraco-cms/backoffice/collection';

@iOvergaard iOvergaard changed the base branch from v17/dev to main October 30, 2025 10:51
Copy link
Contributor

@AndyButland AndyButland left a comment

Choose a reason for hiding this comment

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

Working as expected, I now only see the three relevant entity actions (on the tree, as a workspace action and as a collection item action), e.g.

image

@madsrasmussen - I've set to auto-merge but there's a Copilot comment for you to consider before it'll go through.

@AndyButland AndyButland enabled auto-merge (squash) October 30, 2025 11:39
@AndyButland AndyButland merged commit b8cb198 into main Oct 30, 2025
34 checks passed
@AndyButland AndyButland deleted the v17/bugfix/remove-non-relevant-actions-for-trashed-entities branch October 30, 2025 12:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

V17 Publish/Unpublish/Duplicate To actions still available for child items of a trashed collection

2 participants