Skip to content

Add Date Modified and Date Created sorting for repositories #1486

@fabiovincenzi

Description

@fabiovincenzi

Context

The repo list UI has a sort dropdown that previously included "Date Modified" and "Date Created" options. These are being removed as part of the server-side pagination in #1464 because the fields lastModified and dateCreated don't exist on the Repo model, sorting fell back silently to alphabetical order.

What needs to be done

  • Add lastModified and dateCreated fields to the Repo model
  • Populate them on repo creation and update
  • Add them to the sortBy allowlist in the repo route
  • Re-add the options to the Filtering dropdown in the UI

Migration considerations

  • Existing DB records won't have these fields
  • Need a migration strategy for both MongoDB and NeDB
  • Should consider backwards compatibility / ability to roll back
  • kriswest noted: dates could potentially be extracted from existing logs

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions