It's nice to be able to group several workflow states into one filter with Views' grouping options. This also allows to show a chosen filter label instead of the (often unusable) state name(s). (Under Filter type, select Grouped filters instead of Single filter)

Here's a patch that changes the views filter to work with grouping.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

NancyDru’s picture

Please give me the steps to reproduce and test this.

interX’s picture

FileSize
60.65 KB

Basically it's :

  • Add at least two workflow states (I have 3 workflows with multiple states, each with a kind of published, rejected and draft state)
  • Create a view with an exposed filter on workflow state
  • As I don't want multiple similar states in my dropdown, I added a grouped filter that combines them in one entry for published etc.

Currently this gives a query error since the grouped filter is an array instead of a single value in the filter handler.
I added a screenshot of a dummy view's filter dialog to show the exact settings.

NancyDru’s picture

Status: Needs review » Fixed

Committed, with attribution to you.

NancyDru’s picture

Status: Fixed » Closed (fixed)

Included in 7.x-1.1-beta2.