First thought this was only for fields but then realized there was a special field for just the state name (gets rid tacking on the workflow name to all the states). But now trying to add an exposed filter for states.. and there it is again but with no way i see now (short of a form_alter) to get rid of this.

Rarely do i think it is required to list the workflow name alongside the state - so would be nice if there was a way to get rid of this.

Comments

mudd’s picture

Upgrading from Workflow 6x-1.1 to 1.5 and now all of my table views show State:
[workflow_name]: [state_name]

They used to just be [state_name]

Is due to the maintainers adopting code to distinguish between different workflows (if more than one exists), or something else?

If the former, then please make this new notation an option rather than forced, as one can imagine having state-name rather workflow-name:state-name is a bit weird for a simple scenario.

In the meantime, has anyone figured a way to change the SID text with hacking Workflow? (form_alter?)

liquidcms’s picture

someone posted a link to a module (on a totally different issue) for a workflow extension module that possibly fixes this issue.. i just don't recall what the module was.. but sure a little googling and you'll find it.

Bastlynn’s picture

Status: Active » Closed (works as designed)

"Workflow Extensions" is the module you're looking for.

For the views - to remove "State: " you can edit the field and blank out the label. The rest of it was added to assist with multiple workflow environments, where similarly named states existed.

mudd’s picture

@ BastLynn

1. Please correct me if i'm wrong, but doesn't Workflow Extensions just let you customize the buttons for changing states, but not modify the new [workflow-name]:[state-name] to the original plain [state-name] (the OP's issue).

2. In Views, I believe the field label isn't what generates the [workflow-name]: string.

Yes, "the rest of it was added to assist with multiple workflow environments" but the argument is this:
Why did the maintainers change the SID/token from [state-name] to [workflow-name]:[state-name] without providing an option to override to the original form?

If Ford began producing only six-wheeled vehicles because a few people need them, then what of the folks who don't want six-wheeled vehicles?

Bastlynn’s picture

The reason for changing was well before my time, so I couldn't tell you *exactly* their logic on it.

I think Workflow Extensions covers a little more than just the buttons, but I may be wrong on that. Go ahead and take a look at it and let me know if it covers the situation. If it doesn't, I'll be glad to reopen the ticket and look at this.

Pongolyn’s picture

I've just installed Workflow Extensions for this purpose and as far as I can tell there is no option to strip or customize the labels for the current state (only to customize state transitions, which I'm not so interested in doing). Blanking out the field label in Views also has no effect; it remains [workflow-name]:[state-name] instead of just [state-name].

This clutters up the view and has generated some complaints from my key users. Is there a workaround?

waltercat’s picture

Has this been figured out yet? I would like to get rid of it as well, it's simply clutter for my users.

Thanks!

WorldFallz’s picture

Status: Closed (works as designed) » Active

If you want a maintainer to look at an issue, it's probably a good idea to mark it 'active', lol.

I just ran into this as well-- including irrelevant workflows as option groups (even when using the 'limit to selected items' option is used) is really confusing & irritating my users. I can fix it manually with a form_alter, but it seems to me there should be a better way to select only the applicable workflows.

I'm happy to work on a patch if you have any suggestions for an implementation. I don't yet.

nancydru’s picture

A patch is likely the only way this has a chance of going in. I am essentially leaving 6.x alone. Do you see this on 7.x?

WorldFallz’s picture

In d7 they're not option groups so its much less intrusive but yes, the workflow name is prepended to the state which, if there's only one, is unnecessary. But it's also easier to remove by theming the exposed filter form.

I'd have included patch, but my form_alter is pretty specific to my workflow and I'm not really sure what the best way to approach it generically would be. I can think of 2 options off the bat. One, provide an option (multiselect) for which workflows to allow and remove the string at the beginning. Or two, if there's only one workflow appearing in the select list, leave off the workflow name. I'm not really crazy about either of those though.

nancydru’s picture

Status: Active » Postponed (maintainer needs more info)

This does not happen if there is only one workflow, in 7.x at least. However, workflows may have the same state name in more than one workflow (as a matter of fact, my production site does), so it is necessary to add the workflow name in order to distinguish them. What else can we do?

WorldFallz’s picture

Yep, I missed that. D7 works fine with only 1 workflow.

So how do you remove workflows that are irrelevant to the current view? Or am I just doing something edge case? Almost all my views are content type specific so any workflow state exposed filter will show lots of irrelevant options requiring the user to know which workflow applies for that view.

And at this point, I doubt it's worth doing anything for d6.

nancydru’s picture

I suppose that if I understood Views coding it would be possible to recognize the workflow_type_mapping to limit the states that are available.

WorldFallz’s picture

Status: Postponed (maintainer needs more info) » Postponed

I'm still struggling with it myself, but the next major task I need to do is upgrade the site I'm working on to d7 so hopefully I'll be able to spend some time figuring this out and post a patch. Thanks for letting my bounce the ideas around.

I'm thinking simple views filter option like "Limit list to selected workflows" with a standard multiselect form element would be good enough.

nancydru’s picture

Sounds reasonable, except when the multiple lists contain the same state name.

johnv’s picture

Title: would be nice to not always have the workflow name as part of state (views) » would be nice to not always have the workflow name as part of state (views) (D6)

Going through the issue list to see if D6-issues are still an issue in D7:
In D7, the 'workflow' is only shown in the Views Filter for workflow states. The Views Fields only show the state name or state ID, not prefixed by Workflow name. You might need a 'workflow name/id' field, though, but since you only can add 1 workflow to a node type, this can hardly be a problem.
So, this is fixed in D7. Setting the title accordingly. D6 probably won't be fixed anymore.

WorldFallz’s picture

In D7, the 'workflow' is only shown in the Views Filter for workflow states.

i haven't used this in d7 for a while, but since that's the main issue (having irrelevant workflows clogging up the exposed filter drop down and confusing users), i'm not really sure how it could be considered fixed. My d7 upgrade is on hold for now though, so I haven't had a chance to work on it yet.

johnv’s picture

@WorldFallz, you are right - I was confusing a Field issue with a Filters issue.
About the filters: in D7, the Views Filter only shows the workflow when there is more than 1 workflow defined in the system.
There is another D7-issue, that improves the current filter. I'll implement that in the coming weeks.

johnv’s picture

Title: would be nice to not always have the workflow name as part of state (views) (D6) » Do not (always) show the workflow name as part of state name in Views Filter (D6)

a clearer title.

johnv’s picture

Component: Code » Views
johnv’s picture

Issue summary: View changes
Status: Postponed » Closed (won't fix)

Closing this issue, since there is no patch attached to this issue, and D7 is better, and D6 is not maintained..