Backdated work's published_at date does not always override revised_at date, resulting in blurb and meta showing different dates

Description

Example URL: https://archiveofourown.org/works/14406267 & https://archiveofourown.org/users/testy/works

Steps to reproduce

Note: This can only be reproduced if the time is after 00:00 UTC, but before 00:00 US Eastern. Thanks to daylight saving, this can be between 00:00-04:00 or 00:00-05:00 UTC depending on the time of year.

  1. Login

  2. Post > New Work

  3. Fill in required fields

  4. Check "Set a different publication date" but do not change the pre-selected date

  5. Post Without Preview

  6. Edit work

  7. Change publication date to e.g. 23 July 2015

  8. Post Without Preview

What happens

The work meta on the top of the work uses the backdated date and says "Published: 2015-07-23."

The date in the upper right of the blurb (located on the creator's works pages, tag listings, etc) says the day the work was posted, e.g. 23 Apr 2018.

In work listings sorted by Date Updated, the work is sorted by 23 Apr 2018.

What should happen

The work meta behavior is correct.

The blurb, however, should use the backdated date.

The work should be sorted in listings according to the backdated date.

Notes

This is not a caching or indexing issue. A look at a buggy work as it exists in MySQL shows:

For comparison, a backdated work that is not buggy looks like:

Note: revised_at is the date shown on work blurbs; published_at is the date shown in the meta.

The work creator cannot correct this by editing the work to change the backdated date, or by turning backdating off and back on.

Activity

Show:
redsummernight
January 18, 2019, 2:43 PM

Blurb dates (revised_at) of buggy works encountered in the wild can be manually fixed by:

Assignee

Unassigned

Reporter

Sarken

Roadmap

Works

Priority

Medium

Affects versions

Fix versions

None

Components

BackEnd

Difficulty

Hard

Epic Link

Milestone

Internal 0.9