Add shipped and delivered timestamp fields to shipments

Created on 28 February 2025, about 1 month ago

Problem/Motivation

We should add a shipped timestamp which is set on send transition. The changed timestamp should not be used as a shipped timestamp, and should be kept distinct from it as you may make edits to the shipment before you send it. I also think it would be good to add a delivered timestamp which is set on a new deliver transition.

Proposed resolution

This would be similar to The Way Commerce orders are handled and that they have a created timestamp, a changed timestamp, a placed timestamp, and a completed timestamp.

We can set the shipped timestamp on a commerce_shipment.ship.post_transition event. The delivered timestamp should be able to be set programmatically, or manually through the UI.

Remaining tasks

Add the fields, functions and interface and an update hook.

API changes

Nothing major.

Data model changes

Nothing major other than the fact that old shipments won't show shipped or delivered, as we have no way of knowing after the fact when it happened.

Feature request
Status

Active

Version

2.0

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024