I would like to evaluate line_item -> quantity before line_item is saved.
I've created a rule firing on "before line item saved" event.
I've added 2 actions:
variable_add(evaluating desired quantity of line item)
data_set. Setting data to commerce-line-item:quantity from variable, created in the first action
I'm always getting
Rules evaluating log. This is an excerpt:
0 ms Rule Evaluate quantity fires.
0.497 ms Evaluating the action variable_add. 
0.736 ms Added the provided variable variable_added of type decimal 
1.968 ms Evaluating the action data_set.  69.962 **ms *Unable to modify data "commerce-line-item:quantity": Invalid data value given. Be sure it matches the required data type and format*.
72.107 ms Unable to evaluate action data_set. **
72.286 ms Rule Evaluating quantity has fired.
How to fix this error?
May I use substitutions (e.g.
[commerce-line-item:quantity] etc) in PHP evaluation in 1, 2 actions? May I call functions (e.g.