foreach ($choices as $sid => $name) {
          if (isset($flag)) {
            $new_state = $sid;
            $new_state_name = $name;
            break;
          }
          if ($sid == $current_state) {
            $flag = TRUE;
          }
        }

Please look carefully at the function. It is part of the function action_workflow_execute_transition.

This will only work (!) if the current_sid is always the first sid - but as we know - this is not guaranteed in 1.2

i changed it like this - but still - this is only a hack:

foreach ($choices as $sid => $name) {
        if ($sid == $current_state) {
            $flag = TRUE;
          }
        if (!$flag) {
            $new_state = $sid;
            $new_state_name = $name;
            break;
          }
         /* if ($sid == $current_state) {
            $flag = TRUE;
          }*/
        }

Comments

jvandyk’s picture

Status: Active » Closed (works as designed)

No. This simply moves it to the next state.

chriszz’s picture

It should move it to the next state. The solution now implemented will only do this, if the current_sid is first in the row. But since 1.2 this is not the case anymore. So action_workflow_execute_transition is broken!

chriszz’s picture

It works for me - but maybe i am wrong. It is an urgent issue in my opinion!

chriszz’s picture

Status: Closed (works as designed) » Active
Bastlynn’s picture

Status: Active » Closed (won't fix)

Hi,

With the release of Drupal 7, Drupal 5 is no longer receiving security updates, reviews, or development from many contributed modules. Since 5 is now considered a depreciated version, you really should seriously look into upgrading to Drupal 6 or 7. The newer versions of Drupal work better, have more support, and will be safer (literally! security patches!) for your website. We are currently working on a new release for Workflow to Drupal 7. In light of that, further support for Drupal 5 issues is infeasible at the moment. Please consider upgrading to Drupal 6 or 7 in the near future - you'll be glad you did.

- Bastlynn