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
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
lastModifiedanddateCreateddon't exist on the Repo model, sorting fell back silently to alphabetical order.What needs to be done
lastModifiedanddateCreatedfields to theRepomodelsortByallowlist in the repo routeMigration considerations