1) The placed timestamp is set in commerce_order_commerce_order_presave() and does some hacky logic to determine the transition, even though we now have transition events.

2) The completed timestamp is never set.

Let's fix that.

Comments

bojanz created an issue. See original summary.

bojanz’s picture

Actually, can't use the event for "completed" since that happens under different transitions.
Thinking about it more, we can just maintain both timestamps in Order::preSave(), it makes sense since that class owns the timestamps anyway.

  • bojanz committed 080ca52 on 8.x-2.x
    Issue #2823919 by bojanz: Improve order timestamp setting
    
bojanz’s picture

Status: Active » Fixed

Did the event subscriber for placed and preSave for completed, couldn't be done otherwise.

Status: Fixed » Closed (fixed)

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