I created a Conditional Action predicate with two conditions, to catch when an order changes from uncompleted to completed.

For argument: Original Order, status completed (Negation checked)
For argument: Updated Order, status completed (Negation unchecked)

(I realize this is redundant if the trigger really only fires when an order changes status, but I was trying to be careful)

In any case, I could not get the argument to save as "Updated Order". Whenever I would save the predicate it would go back to being Original Order.

Comments

Nick Urban’s picture

Forgot to mention that the trigger was "order status gets updated".

Nick Urban’s picture

Status: Active » Needs review

I found the problem. The database was being updated correctly, but the form's default value for Arguments was not being set properly.

In _ca_conditions_form_condition, ca.admin.inc line 846:

'#default_value' => $action['#argument_map'][$key],

references an out of scope variable ($action).

It looks like it should be:

'#default_value' => $condition['#argument_map'][$key],

Island Usurper’s picture

Status: Needs review » Fixed

This is probably going to save someone a lot of pain down the road. It's a good thing that I've taken care of the problem that made the argument selection not matter on that condition.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.