Skip to content

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).

  1. In !78572 (merged), the first step to solve this problem was done: The updated_at property now contains the actual timestamp of the last update (considering last_activity_at and last_repository_updated_at as well).
  2. !79007 (closed): A background migration updates projects.updated_at by the greatest timestamp of last_activity_at, last_repository_updated_at and updated_at. This step was skipped.
  3. In this MR: If you sort the list by "Last updated" (or "Oldest updated"), it will consider updated_at instead of last_activity_at.

🛠 with at Siemens

/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.

Edited by Jonas Wälter

Merge request reports