Skip to content

Publishing a metastore does not change revision date #4621

@swirtSJW

Description

@swirtSJW

Current Behavior

In Metastore Data.php the function setWorkflowState() does not add a revision date. This creates a confusing situation where a draft made weeks ago and a publish today shows the two revisions with the same date.

revisions weeks apart end up with same timestamp

This comes from an odd drupalism where if a revision has not timestamp set it uses the timestamp from the previous revision, creating confusion throughout the land.

Calling
$entity->setRevisionCreationTime(<timestamp here>);
right before the $entity->save() will resolve this.

Time stampery will need something like \Drupal::time()->getCurrentTime()

Expected Behavior

  • When a dataset publishes or goes through some other status change, the revision list tells the true story.

Steps To Reproduce

  1. Save a datset in draft.
  2. wait 10 minutes
  3. Publish it using the metastore publish function
  4. View the revision log. shows the same date and time.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions