Skip to content

fix: show publish date instead of draft creation date for news#4645

Closed
GMetaxakis wants to merge 2 commits intoONEARMY:masterfrom
GMetaxakis:fix/news-publish-date
Closed

fix: show publish date instead of draft creation date for news#4645
GMetaxakis wants to merge 2 commits intoONEARMY:masterfrom
GMetaxakis:fix/news-publish-date

Conversation

@GMetaxakis
Copy link
Copy Markdown
Contributor

PR Checklist

  • - Unit and/or e2e tests for the changes that have been added (for bug fixes / features)

PR Type

  • Bugfix

What is the new behavior?

  • Adds a published_at column to the news table to track when an article was actually published
  • When news is created as non-draft, published_at is set to the current time
  • When a draft is published (draft→published transition), published_at is set at that moment
  • News list and detail pages now display published_at instead of created_at when available
  • Existing published news is backfilled with created_at as the publish date via migration

Does this PR introduce a DB Schema Change or Migration?

  • Yes

Git Issues

Closes #4479

Add published_at column to the news table with a migration that
backfills existing published news with their created_at date.
Set published_at when news is created as non-draft or when a draft
is published. Display published_at in news list and detail pages.

Closes ONEARMY#4479
@GMetaxakis
Copy link
Copy Markdown
Contributor Author

Closing as duplicate of #4643.

@GMetaxakis GMetaxakis closed this Mar 1, 2026
@GMetaxakis GMetaxakis deleted the fix/news-publish-date branch March 3, 2026 10:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

[bug] Show Publish date not draft date

1 participant