Problem/Motivation

It is not possible to create a view of workspace entities currently as there's no views data handler defined in the entity annotation. This small addition would be quite useful as it could help building overviews of workspaces, which can be filtered, sorted, etc.

At the moment we require this for example in #3229061: Scheduled publishing of workspaces where we would like to build an overview of scheduled workspaces using views.

Issue fork drupal-3230095

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:

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

s_leu created an issue. See original summary.

s_leu’s picture

Status: Active » Needs review
FileSize
650 bytes

Here's a patch that applies to both, 9.3.x and 8.9.x and adds a basic views data handler to the workspace entity annotation.

amateescu’s picture

Status: Needs review » Reviewed & tested by the community

Looks good to me!

alexpott’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: +Needs tests

I was pondering about test coverage. Obviously we missed this from our initial creation of the entity. I think it would be great to ensure that that workspace views at least are available so that we can be sure that we don't remove this in the future erroneously. The test does not need to do much beyond proving that you can make a view on a workspace as the base entity views data class is well tested already.

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.

amateescu’s picture

Status: Needs work » Reviewed & tested by the community
Issue tags: -Needs tests
FileSize
1.77 KB
2.4 KB

Added a quick test :)

The last submitted patch, 8: 3230095-8-test-only.patch, failed testing. View results

longwave’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed 14496b9f6a to 10.1.x. Thanks!

  • longwave committed 14496b9 on 10.1.x
    Issue #3230095 by s_leu, amateescu, alexpott: Views data for workspaces
    
amateescu’s picture

Status: Fixed » Reviewed & tested by the community

Thanks, @longwave! This can most likely be backported all the way back to 9.5.x or even 9.4.x, right?

longwave’s picture

Well it's a feature and so should technically only go into 10.1.x now we are in release candidate phase, but also I don't see the harm in backporting; leaving open for other committers' opinions.

quietone’s picture

Status: Reviewed & tested by the community » Fixed

I think the window of opportunity for backport has passed here. Changing the status to fixed.

Status: Fixed » Closed (fixed)

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