Skip to content

Objects without post__date_published appear first despite descending order #55

@rprader

Description

@rprader

Currently, when accessing the overview of all articles, entries without a post__date_published value appear before those that have one.

Use case:

When creating posts, I am not always specifing a publication date.

  • If I publish a post immediately, I leave post__date_published empty — as it’s not required.
  • If I plan a post in advance, I explicitly set a post__date_published value.

As a result, immediately published posts (with no date_published) currently appear before the scheduled ones, which is the opposite of what’s expected.

Expected behavior:

The post__date_published field should serve as the primary sorting criterion, and if it’s missing (NULL), the ordering should fall back to post__date_created. In other words, the most recently published posts should appear first, followed by those without a publication date, sorted by their creation time.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions