As far as I can tell, there isn't an existing method for mapping content imported via Feeds to workflow states. (There is, of course, the ability to map to the core workflow statuses like published/ not published). It would be a great feature to have. Or, perhaps I'm wrong, it exists, and I just couldn't find it.
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | Captura de pantalla de 2016-03-23 10:54:59.png | 24.36 KB | renzomb |
Comments
Comment #1
nancydruPatches always welcome
Comment #2
johnvPatches are still welcome..
Comment #3
nwom commentedThis functionality would be amazing. I would also be extremely grateful if this was somehow possible.
Comment #4
johnvA workflow_field should be settable as if it was a 'normal' field.
You cannot set the comment then, but you may try function hook_workflow_comment_alter() for that. (See file workfow.api.php)
As Nancy said: Patches, scripts and experiences are welcome.
Comment #5
nwom commentedFor those looking for a dirty workaround:
Comment #6
renzomb commentedIm working in a better way to do this.
For now i have a MVP that works. This is my workaround:
Declare the mapper:
Get the value:
Make the transisiton, after the the node has been created.
There is a lot of work to do, and some border case to check. But with only a workflow of 5 states and with the same label on the 2 servers its working like a charm.
This is a work in progress so if needed i can keep updating this code in my search to the better way.
Comment #7
sagar ramgade commentedI used the following code for workflow field, which works fine:
Comment #8
johnvNew features for D7 are not processed anymore.