I find the current filter a bit wierd once you more than one workflow on your site. when you limit states to particular terms you still get the workflow titles listed even if they offer no states to the filter. So I modifed the filter a little bit (well the patch makes it look like a lot!) so that the current state workflow filter work a bit more like the 'All terms' filter for taxonomy. You can now:

  1. limit states by workflow
  2. prevent the (creation) state from appearing in the filter

Comments

MamaGubs’s picture

Problem solved.

THANK YOU!!!!

dawehner’s picture

Status: Active » Needs review

update status

josh waihi’s picture

Does #1 not count as a review?

dawehner’s picture

Sure it does count. Do you thinks this means rtbc?

josh waihi’s picture

well, I'm using it, sounds like #1 is using it. Seems like its working for the both of us. Yeah I could count that as RTBC. The Only thing I'd be weary or is whether it breaks existing view implementations.

simon georges’s picture

Status: Needs review » Reviewed & tested by the community

Cross-referencing #344140: Views filter for workflow state, shows "Unknown" & #779262: Select specific workflow for Views filter as they seem to concern the same topic (maybe a merge of the patches would be interesting ?).
By the way, changing the status, as it is indeed confirmed by several people.

stevehuk’s picture

This patch works well for me, doing just what I needed. Thanks.

My existing workflow status filters had odd values when I tried to edit them in the view, but were perfect when I recreated them. This might be an issue if this patch were committed since if my experience is typical it could break existing workflow state filters.

mas160’s picture

Confirm observation in #7, if there are already views with workflow status filter applied, this is broken, and you need to delete and reapply the filter in order to make it work.

A further observation: say you have a number of workflows and want see listed statuses pertaining to more than one of them, this is not possible, since isn't possible to select more than one workflow at time.

Encarte’s picture

subscribe

WorldFallz’s picture

still applies, works as described and solves the problem. Any chance we can get a commit on this?

jdwfly’s picture

Just what I needed, patch applied clean. Only thing is I had to remove and add the workflow filters again, so it did break my existing workflow filters.

+1

chaconnewu’s picture

Version: 6.x-1.3 » 7.x-1.0
Component: Code » Miscellaneous

Hi, I'm using drupal 7, the latest release version. I've configured a workflow and it runs perfectly. I would like to use filter in view to display contents that belongs to a certain type of a workflow. However, I cannot find any workflow filter in the view setup page. I'm wondering where can I find all the workflow states. Thanks in advance!

Encarte’s picture

Version: 7.x-1.0 » 6.x-1.3
Component: Miscellaneous » Code

@chaconnewu

You are right to search for open issues before posting new ones, but this issue has a patch waiting to be committed against D6, so you should open a new issue for D7. Views better support sure is a must.

Bastlynn’s picture

Ticket #779262: Select specific workflow for Views filter has been closed as a duplicate of this one. It looks like the patch in that ticket matches the base of work done in this ticket as well, so both issues will be closed once this patch is in place.

Bastlynn’s picture

Version: 6.x-1.3 » 7.x-1.x-dev
StatusFileSize
new3.81 KB

I've rerolled the patch for 7 as well. Can someone please check this to make sure it works properly on a 7.x install?

Bastlynn’s picture

Status: Reviewed & tested by the community » Needs review

Setting back to needs review for the 7.x version of this.

Toeterniettoe’s picture

Hi,

I don't get this patch to work either...

I get following message:

Notice: Undefined variable: states in workflow_views_handler_filter_sid->get_value_options() (regel 60 van
/sites/all/modules/workflow/workflow_views/includes/workflow_views_handler_filter_sid.inc).
Warning: Invalid argument supplied for foreach() in workflow_views_handler_filter_sid->get_value_options() (regel 62 van
/sites/all/modules/workflow/workflow_views/includes/workflow_views_handler_filter_sid.inc).

When I want to change or add filtering by state, I get an error pop-up.

nancydru’s picture

Assigned: Unassigned » Bastlynn
Status: Needs review » Needs work

Based on #17, setting to needs work.

nancydru’s picture

Patch does not apply now.

nancydru’s picture

Component: Code » Views

Still hoping someone will fix this

johnv’s picture

Version: 7.x-1.x-dev » 7.x-1.2
Assigned: Bastlynn » Unassigned
Issue summary: View changes
Status: Needs work » Fixed

This functionality is added in 7.x-2.x in this commit.
There is a slight difference in functionality: you can toggle between ALL states (including inactive and Creation states) or active states (without Creation).

johnv’s picture

Title: Workflow: make views filter better » Workflow: in SID filter handler, add additional selection for 'creation' state and workflow type

better title.

johnv’s picture

Title: Workflow: in SID filter handler, add additional selection for 'creation' state and workflow type » Add selection for 'creation' state and workflow type in "Workflow: current state " filter

Status: Fixed » Closed (fixed)

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

johnv’s picture

A follow-up is committed here, removing PHP warnings.