Problem/Motivation

Currently when adding a filter to a view for moderation state, it is treated like a basic value field:

It would be great if this could instead get the same treatment as, for instance, 'Content type', or taxonomy terms, etc:

Proposed resolution

Use the InOperator filter to expose this information. For example, entities get the Bundle filter plugin for this functionality.

(This could potentially get tricky for sites with multiple workflows...)

Remaining tasks

User interface changes

API changes

Data model changes

Comments

jhedstrom created an issue. See original summary.

jhedstrom’s picture

Title: Provide checklist of workflow translations in Views filter » Provide checklist of workflow transitions in Views filter
jhedstrom’s picture

Issue summary: View changes
jhedstrom’s picture

Issue summary: View changes
sam152’s picture

Title: Provide checklist of workflow transitions in Views filter » Provide checklist of workflow states in Views filter

Filtering would be based on state, updating issue title.

kmoll’s picture

Assigned: Unassigned » kmoll
jhedstrom’s picture

kmoll’s picture

StatusFileSize
new4.68 KB

I've got a first stab at a patch here. Its not complete, there is an error on the view that I looking at, but wanted to make sure we were going in the right direction.

sam152’s picture

I don't think the approach in #8 will work based on it being a computed field. I think the query aspect will have to join against the content_moderation_state entity in order to actually provide filtering.

mstef’s picture

I believe the patch needs to be updated regarding #2859381: Broken/missing handler for Moderation state field.

The only way I can get a state filter is to add a relationship to the moderation and use the filter that comes from that..

sam152’s picture

If we're adding filter support to the computed field, the query part of the plugin will need to do the appropriate joining against that entity. Ideally the user should't need to add the relationship to make it work.

kmoll’s picture

Unassigning me for now, I would like to pick this up in the next few days and re-vamp the patch, but don't want to delay development if someone else wants to get it completed.

kmoll’s picture

Assigned: kmoll » Unassigned
plach’s picture

Status: Active » Closed (duplicate)

As @Sam152pointed out over there this seems to be duplicating #2862041: Provide useful Views filters for Content Moderation State fields.

Closing this one even if it's older and more active because the other issue is linked in the meta issues. I will summarize the relevant parts over there.