You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the order is paid for then these shipments will be updated to ready. The problem is that this update skips callbacks so Spree::Shipment#my_method will not be called even though the shipment has transitioned to a state of ready.
Expected behavior would be that when the order moved to complete and updates the shipments. Each shipment that is updated to another state will create a transition event for that state change.
This is a can of worms. We explicitly don't run the Shipment state machine, and rather determine the shipment's state by its attributes for performance and complexity reasons (the order and shipment state machine interact in strange ways).
You're right in that we should do one of two things: Either remove the shipment state machine entirely, or actually use it.
Assume the below setup:
After an order is completed,
Spree::Order#finalize!
gets called.See
solidus/core/app/models/spree/order.rb
Lines 409 to 412 in 86501e4
If the order is paid for then these shipments will be updated to
ready
. The problem is that this update skips callbacks soSpree::Shipment#my_method
will not be called even though the shipment has transitioned to a state ofready
.Expected behavior would be that when the order moved to
complete
and updates the shipments. Each shipment that is updated to another state will create a transition event for that state change.Solidus 2.2
Happens in Core Solidus
See #2065 for specs recreating behavior
The text was updated successfully, but these errors were encountered: