Project list: order by real last update
What does this MR do and why?
A project list is displayed in various places in GitLab (e.g. dashboard or Explore projects page). For each project in the list, it shows when it was last updated (e.g. "Updated 1 week ago"). This text is based on the maximum of three timestamps of a project: last_activity_at, last_repository_updated_at, and updated_at. This is fine and makes sense.
However, there is a problem with sorting: You can sort the list by "Last updated" (or "Oldest updated"), but unfortunately this sorting option only considers the last_activity_at timestamp. This causes that the project list doesn't seem sorted correctly for the user (see screenshots below).
- In !78572 (merged), the first step to solve this problem was done: The
updated_atproperty now contains the actual timestamp of the last update (consideringlast_activity_atandlast_repository_updated_atas well). -
!79007 (closed): A background migration updatesThis step was skipped.projects.updated_atby the greatest timestamp oflast_activity_at,last_repository_updated_atandupdated_at. -
In this MR: If you sort the list by "Last updated" (or "Oldest updated"), it will consider
updated_atinstead oflast_activity_at.
/cc @bufferoverflow
Screenshots
| before | after |
|---|---|
![]() |
![]() |
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.

