Problem/Motivation

We discovered in #2975334: Prevent changes that would leak into the Live workspace that some VBO actions might be safe to run in a non-default workspace, for example those that deal with supported (revisionable and publishable) entity types, while others might not be.

Proposed resolution

Use the API provided by #3208390: Add an API for allowing modules to mark their forms as workspace-safe and allow bulk operations for supported entity types.

Remaining tasks

Review.

User interface changes

Nope.

API changes

The API added in #3208390: Add an API for allowing modules to mark their forms as workspace-safe is being extended with a new trait (Drupal\Core\Entity\Form\WorkspaceSafeFormTrait), based on the needs that were observed while implementing support for bulk operations.

Data model changes

Nope.

Issue fork drupal-2986005

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

amateescu created an issue. See original summary.

Version: 8.6.x-dev » 8.7.x-dev

Drupal 8.6.0-alpha1 will be released the week of July 16, 2018, which means new developments and disruptive changes should now be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

amateescu’s picture

Component: workspace.module » workspaces.module

Fix component following module rename.

Version: 8.7.x-dev » 8.8.x-dev

Drupal 8.7.0-alpha1 will be released the week of March 11, 2019, which means new developments and disruptive changes should now be targeted against the 8.8.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.0-alpha1 will be released the week of October 14th, 2019, which means new developments and disruptive changes should now be targeted against the 8.9.x-dev branch. (Any changes to 8.9.x will also be committed to 9.0.x in preparation for Drupal 9’s release, but some changes like significant feature additions will be deferred to 9.1.x.). For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.9.x-dev » 9.1.x-dev

Drupal 8.9.0-beta1 was released on March 20, 2020. 8.9.x is the final, long-term support (LTS) minor release of Drupal 8, which means new developments and disruptive changes should now be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.5.x-dev » 10.1.x-dev

Drupal 9.5.0-beta2 and Drupal 10.0.0-beta2 were released on September 29, 2022, which means new developments and disruptive changes should now be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

amateescu’s picture

Issue summary: View changes
Priority: Normal » Major
Status: Active » Needs review

It turns out that the work done in #3208390: Add an API for allowing modules to mark their forms as workspace-safe was pretty much on point and useful for the use cases tackled by this issue.

Some changes in this MR might seem weird, so I'll add some comments on the MR itself to try and explain them directly in a code context.

smustgrave’s picture

With the changes to view wonder if it needs sub-maintainer sign off? Thoughts?

amateescu’s picture

Well.. the MR doesn't change any functionality in Views, so I don't think it's needed here :)

smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

Ran the test-only feature and got the results here https://git.drupalcode.org/issue/drupal-2986005/-/jobs/1425066

Since workspace isn't marked stable in a released version yet assuming this is fine without a CR.

Reviewing the code believe this is good. Maybe future feature request or contrib module would be a UI to set these.

longwave’s picture

I think we should update the change record from #3208390: Add an API for allowing modules to mark their forms as workspace-safe to mention this new trait and link to this issue.

amateescu’s picture

@longwave, good idea, done!

  • catch committed dfcd148f on 10.3.x
    Issue #2986005 by amateescu, longwave: Add the ability to mark (VBO)...

  • catch committed 0a645047 on 11.x
    Issue #2986005 by amateescu, longwave: Add the ability to mark (VBO)...
catch’s picture

Version: 11.x-dev » 10.3.x-dev
Status: Reviewed & tested by the community » Fixed

Committed/pushed to 11.x and cherry-picked to 10.3.x, thanks!

  • catch committed 0a645047 on 11.0.x
    Issue #2986005 by amateescu, longwave: Add the ability to mark (VBO)...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.