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:
- limit states by workflow
- prevent the (creation) state from appearing in the filter
| Comment | File | Size | Author |
|---|---|---|---|
| #15 | workflow-views_filter-658880-2.patch | 3.81 KB | Bastlynn |
| better-workflow-filter.patch | 3.06 KB | josh waihi |
Comments
Comment #1
MamaGubs commentedProblem solved.
THANK YOU!!!!
Comment #2
dawehnerupdate status
Comment #3
josh waihi commentedDoes #1 not count as a review?
Comment #4
dawehnerSure it does count. Do you thinks this means rtbc?
Comment #5
josh waihi commentedwell, 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.
Comment #6
simon georges commentedCross-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.
Comment #7
stevehuk commentedThis 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.
Comment #8
mas160 commentedConfirm 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.
Comment #9
Encarte commentedsubscribe
Comment #10
WorldFallz commentedstill applies, works as described and solves the problem. Any chance we can get a commit on this?
Comment #11
jdwfly commentedJust 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
Comment #12
chaconnewu commentedHi, 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!
Comment #13
Encarte commented@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.
Comment #14
Bastlynn commentedTicket #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.
Comment #15
Bastlynn commentedI've rerolled the patch for 7 as well. Can someone please check this to make sure it works properly on a 7.x install?
Comment #16
Bastlynn commentedSetting back to needs review for the 7.x version of this.
Comment #17
Toeterniettoe commentedHi,
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.
Comment #18
nancydruBased on #17, setting to needs work.
Comment #19
nancydruPatch does not apply now.
Comment #20
nancydruStill hoping someone will fix this
Comment #21
johnvThis 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).
Comment #22
johnvbetter title.
Comment #23
johnvmarked #371558: Add option "hide invalid states" in 'Workflow: state' Views Filter form as a duplicate.
Comment #25
johnvA follow-up is committed here, removing PHP warnings.