Currently, there is no way to output the workflow type from views. You can output the state, time, comments and many other things, but you cannot output the actual workflow name.

The reason I ran into this was that I wanted to show a list of pending workflow items, grouped by the actual workflow. If I have 5 different workflows and they all contain 'Pending' and 'Live' states, there is no way to differentiate between them.

Comments

zhuber’s picture

Status: Needs work » Needs review
StatusFileSize
new3.33 KB

I have patched the module with this functionality, please review and test it when you have a chance.

I also tried create argument and filter handlers for the workflow type and came pretty close, but the table joins started to get a bit tricky for me. I may re-visit this depending on the level of interest from the rest of the community.

nancydru’s picture

Status: Needs review » Needs work

SQLSTATE[42S22]: Column not found: 1054 Unknown column 'wid' in 'field list'

zhuber’s picture

I think this just worked for my specific view now that I look at it. Since I was already loading the state field in my view it seems to find the wid column for me.

I'll revisit this when I get a chance, thanks for testing this so quickly.

nancydru’s picture

Component: Code » Views

That is a danger we all face at times. It works for us, but "Drupalizing" it is more difficult.

johnv’s picture

Version: 7.x-1.x-dev » 7.x-2.x-dev
Issue summary: View changes
StatusFileSize
new1.61 KB

Like NancyDru says: I was very happy with the patch.. , until I stripped the view from all-but-most fields.
I did not encounter the error NancyDru mentions.

Please find attached a patch against latest -dev version.
I've explicitly renamed the 'workflow_types' table to 'workflow_type_map' (since that's the new name of the table), but the patch seems to work with both names.(??)

johnv’s picture

Version: 7.x-2.x-dev » 7.x-1.2
Status: Needs work » Closed (won't fix)

In version 7.x-2.x, there is more possibility to make a difference between workflows.
Please try that version, and reopen if it still does not fit your needs.