If you want to create a view that shows, say, all published content, and you use the Workflow views filter to filter out nodes with workflow states of "moderated" or "hidden," then you will lose all the published nodes that do not have any relationship with workflow.

This patch gives the option to "ALSO SHOW: Unknown to Workflow"

It works but the interface is counterintuitive if using the "is not" option, so I would appreciate some guidance from someone with more views interface writing experience (or just more time!)

benjamin, Agaric Design Collective

Comments

mlncn’s picture

Copy-paste placement fail in last patch. This one should be a tad less aggressive in applying the new feature.

ceardach’s picture

In terms of UI, I had expected the "No State" option to behave in this manner and was surprised that it didn't.

What is the purpose of "No State" ? I couldn't find a case where "No State" applied.

I've applied this patch to the test version of our site. We'll see how bug testing goes, but it looks promising.

mlncn’s picture

The current UI in my patch is not reasonable for the "is not" radio button. It would at least be better making four radio buttons (is, is not, is plus unknown, is not plus unknown), but if i knew anything about making these views thingies I would add a checkbox to the configuration.

I could do the "No State" should behave as unknown suggestion easily, however, and it is true: if people wanted to filter out unknown to workflow, they could filter by content type.

So without other input I'll be re-rolling to make No State include nodes in workflow with no state as well as nodes of node types not known to workflow.

benjamin, Agaric Design Collective

ceardach’s picture

We've been using this patch since my last post, and things have been working as expected.

moshe weitzman’s picture

ceardach’s picture

Assigned: mlncn » Unassigned

Could really use this patch applied to core workflow. A year later, I'm still finding myself using this patch in my projects.

Garrett Albright’s picture

Reroll which fixes a typo.

justice7’s picture

I am having this same problem, however I applied the patch and cannot see the updated changes. Am I doing something wrong?
It didn't seem to do anything to filtering the current workflow state.

ymmatt’s picture

Is there any plan to apply this patch to the main branch?

If not is there any other way to work around the issue?

johnv’s picture

This would be possible if Workflow were a 'true' Field API field, as proposed in #2019345: Create a 'Workflow Field' with Widget, Formatter, Fieldtype

johnv’s picture

Version: 6.x-1.x-dev » 7.x-1.x-dev

Let's focus on #2019345.

johnv’s picture

Component: Code » Views
johnv’s picture

Version: 7.x-1.x-dev » 6.x-1.x-dev
Issue summary: View changes
Status: Needs review » Closed (duplicate)

As stated in #3, an 'unknown for workflow' can be realized with a filter on content type.
The "No state" is indeed not working, but a patch addressing that issue is here: #1021126: 'Workflow: state' Views Filter doesn't filter on Has no state/Has a state.
Hence, closing this as a duplicate.