Problem/Motivation

Shipping method entities should have "created" and "changed" timestamps so content deployment modules like default_content_deploy can support them properly.

Proposed resolution

  • add "created" and "changed" base fields
  • use EntityChangedTrait
  • add getter/setter for "created" field

Remaining tasks

?

User interface changes

For the change tracking to work there is no need for any UI changes.

API changes

Just additions of public access functions for the new fields.

Data model changes

Two added base fields.

Comments

cspitzlay created an issue. See original summary.

cspitzlay’s picture

Status: Active » Needs review
StatusFileSize
new4.41 KB
mkalkbrenner’s picture

Status: Needs review » Reviewed & tested by the community

  • jsacksick committed 0722095 on 8.x-2.x authored by cspitzlay
    Issue #3248745 by cspitzlay, mkalkbrenner: Add "created" and "changed"...
jsacksick’s picture

Status: Reviewed & tested by the community » Fixed

Committed, thanks!

Status: Fixed » Closed (fixed)

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

upchuk’s picture

This is actually cause a bit of a problem when the Shipping Method entity type was marked as translatable and the "content_translation_created" and "content_translation_changed" fields were created by core. These fields are only created in the absence of original "created" and "changed" fields. So now that we added these, there is entity mismatch as the translation fields are no longer being added by core.

The same must have happened here: https://www.drupal.org/project/commerce/issues/3211910.

Not sure why core adds those fields in this circumstance or what we can about it...because simply removing the fields I don;'t think it's an option..

cspitzlay’s picture