Bug #17152

Version snapshots have modified_at of when snapshot was created, not when content was last modified

Added by Peter Amstutz 6 days ago. Updated 2 days ago.

Status:
New
Priority:
Normal
Assigned To:
Category:
-
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Story points:
-

Description

When a collection snapshot is created (recording a version), it appears that modified_at gets set to that point in time. However, because created_at is when version 1 is created, and the same for every snapshot, we don't have a field that tells us when the content of that snapshot came into existence.

In other words, the modifed_at timestamp of a collection snapshot at version N is actually the point in time when version N+1 was created. This is not what we want.

Fix the API server so that snapshots get the modified_at of the collection at the moment the snapshot is taken.

Write a migration that adjust the existing modified_at fields when versioning is enabled. The modified_at of version N should take the modified_at of version N-1. The "modified_at" of version 1 should take the value of "created_at".

History

#1 Updated by Peter Amstutz 6 days ago

  • Description updated (diff)

#2 Updated by Lucas Di Pentima 6 days ago

  • Assigned To set to Lucas Di Pentima

#3 Updated by Peter Amstutz 6 days ago

  • Assigned To deleted (Lucas Di Pentima)
  • Description updated (diff)

#4 Updated by Peter Amstutz 6 days ago

  • Assigned To set to Lucas Di Pentima

#5 Updated by Lucas Di Pentima 2 days ago

  • Status changed from New to In Progress

#6 Updated by Lucas Di Pentima 2 days ago

  • Status changed from In Progress to New

Also available in: Atom PDF