strapi-plugin-content-versioning icon indicating copy to clipboard operation
strapi-plugin-content-versioning copied to clipboard

`createdAt` field gets overwritten when creating new version

Open tavsec opened this issue 11 months ago • 0 comments

Bug report

Describe the bug

When creating new version of versioned model, the createdAt field is also the same as updatedAt date. I think that the createdAt field should also stay the same.

Steps to reproduce the behavior

  1. Create versioned model
  2. Create new entry for this model and save it
  3. Check createdAt date
  4. Update this entry
  5. Check new createdAt date. It is updated, but it shouldn't

Expected behavior

createdAt date should stay the same for all of the versioned (timestamp, when the entry was first created).

System

  • Node.js version: v18
  • NPM version: 9.5
  • Strapi version: v4
  • Database: mysql
  • Operating system: macOS/Ubuntu

tavsec avatar Mar 04 '24 10:03 tavsec