Perhaps I'm missing something (I feel I must be) but I'm trying to get workflow to take certain actions automatically upon the creation of a node, and I'm not getting it to work.

What I want is for a new node to move immediately into the "review" state and send an e-mail to a moderator. It seems as if adding the "Change workflow state of a node to next state" to the "(creation) > review" transition would do the job, but that hasn't worked.

Note that I want this to happen automatically--I don't want to trouble users to flip to a "workflow" tab.

Comments

mfredrickson’s picture

Assigned: Unassigned » mfredrickson

I've seen this bug before and it's irritating. I believe I had a fix in another patch.

Assigning this to me to I can keep on it.

mfredrickson’s picture

Category: feature » bug

Ok, i've tracked down the problem, and I have a work around, though it is not great.

First the issue - when nodes are created they don't have an explicit state set. The "move node to next workflow state" looks for the node's state, and if it can't find it, it bails. Thus, it will not execute the transition to the next state. There are probably a number of ways to solve this, but I want to investigate them more.

Now, workarounds:

1. You can't automatically go from creation -> A -> B. The simplest workaround is to disallow this in your workflow. Sorry.
2. If you provide the author a transition from creation -> A and from creation -> B, this works (for some reason that totally confuses me). The downside is that your authors will be able go directly from creation -> B without hitting A, but with a little custom programming (ie. hook_form_alter) you could eliminate this choice from the form.

This is still a bug, but I'm not going to fix it yet because:

1. I'd like to eliminate the need for actions that move workflows states by providing something more robust. I think they are inherently a kludge.
2. I want to get the 4.7-1.0 release out pronto.

Cheers,
-M

Bastlynn’s picture

Status: Active » Closed (won't fix)

Hi,

This ticket was last updated over 4 years ago, and hasn't seen additional work since then. Based on that, and that development is now progressing on Drupal 7, I'm going to go ahead and close this one out. If you would still like to see this feature, please post a request for Drupal 7, then we can work on the Drupal 6 version.

- Bastlynn