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
Comment #1
Nick Urban commentedForgot to mention that the trigger was "order status gets updated".
Comment #2
Nick Urban commentedI 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],Comment #3
Island Usurper commentedThis 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.